All Packages Class Hierarchy This Package Previous Next Index
Class ss98.system.ProcParser
java.lang.Object
|
+----ss98.system.ProcParser
- public class ProcParser
- extends Object
-
Processes
-
-
ProcessSockets
-
-
Sockets
-
-
ProcParser()
-
-
getDevices()
-
-
getMemInfo()
- this parses the /proc/meminfo file and returns an array of ints.
-
getNetDevices()
-
-
getProcesses()
-
-
getSockets()
-
-
getSysinfo()
- this parses the /proc/stat file.
Processes
private Vector Processes
Sockets
private Vector Sockets
ProcessSockets
private Vector ProcessSockets
ProcParser
public ProcParser()
getProcesses
public Vector getProcesses()
getDevices
public Vector getDevices()
getSockets
public Vector getSockets()
getNetDevices
public Vector getNetDevices()
getMemInfo
public int[] getMemInfo()
- this parses the /proc/meminfo file and returns an array of ints.
Meminfo[]
0 total mem in bytes
1 used mem in bytes
2 free mem in bytes
3 shared mem in bytes
4 buffered mem in bytes
5 cached mem in bytes
6 total swap space in bytes
7 used swap space in bytes
8 free swap space in bytes
9 total mem in Kb
10 free mem in Kb
11 shared mem in Kb
12 Bufferes in Kb
13 Cached mem in Kb
14 Toatl swap in Kb
15 Free swap in Kb
getSysinfo
public int[] getSysinfo()
- this parses the /proc/stat file. It skips the interupt section
This returns an array of ints where theindex equals the following:
cpu_user,
cpu_nice,
cpu_system,
ticks - (cpu_user + cpu_nice + cpu_system),
dk_drive[0],
dk_drive[1],
dk_drive[2],
dk_drive[3],
dk_drive_rio[0],
dk_drive_rio[1],
dk_drive_rio[2],
dk_drive_rio[3],
dk_drive_wio[0],
dk_drive_wio[1],
dk_drive_wio[2],
dk_drive_wio[3],
dk_drive_rblk[0],
dk_drive_rblk[1],
dk_drive_rblk[2],
dk_drive_rblk[3],
dk_drive_wblk[0],
dk_drive_wblk[1],
dk_drive_wblk[2],
dk_drive_wblk[3],
pgpgin,
pgpgout,
pswpin,
pswpout,
context_swtch,
xtime.tv_sec - jiffies / HZ,
total_forks
All Packages Class Hierarchy This Package Previous Next Index