fix of the offset error
This commit is contained in:
parent
39ab90eeb0
commit
6efb3d4ba1
|
|
@ -63,7 +63,7 @@ Public Class netstat
|
|||
Return
|
||||
End If
|
||||
|
||||
For i As Integer = offset.i To lines.Length - 1
|
||||
For i As Integer = offset.i + 1 To lines.Length - 1
|
||||
If Not lines(i).StringEmpty Then
|
||||
Dim tokens As String() = lines(i).StringSplit("\s+")
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ Public Module CentosTools
|
|||
Call df.add("Foreign Address", netstat.Select(Function(a) a.ForeignAddress))
|
||||
Call df.add("State", netstat.Select(Function(a) a.State))
|
||||
Call df.add("PID/Program name", netstat.Select(Function(a) a.Program))
|
||||
Call df.add("listened_port", netstat.Select(Function(a) If(a.LocalListenPort <= 0, Double.NaN, a.LocalListenPort)))
|
||||
Call df.add("listened_port", netstat.Select(Function(a) a.LocalListenPort))
|
||||
|
||||
Return df
|
||||
End Function
|
||||
|
|
|
|||
|
|
@ -23,4 +23,4 @@ udp6 0 0 :::5353 :::*
|
|||
|
||||
";
|
||||
|
||||
print(centos::netstat(text1));
|
||||
print(as.data.frame(centos::netstat(text1)));
|
||||
Loading…
Reference in New Issue