On 11/18/2010 08:47 PM, Adam Stokes wrote:
Some testing output from sigar.
java -jar sigar-bin/lib/sigar.jar
Loaded rc file: ./.sigar_shellrc
I actually meant how usable is the C interface (since thats what we'd be
using). Any comments on that?
sigar> help
Available commands:
alias - Create alias command
cpuinfo - Display cpu information
df - Report filesystem disk space usage
du - Display usage for a directory recursively
free - Display information about free and used memory
get - Get system properties
help - Gives help on shell commands
ifconfig - Network interface information
iostat - Report filesystem disk i/o
kill - Send signal to a process
ls - simple FileInfo test at the moment (like ls -l)
mps - Show multi process status
netinfo - Display network info
netstat - Display network connections
nfsstat - Display nfs stats
pargs - Show process command line arguments
penv - Show process environment
pfile - Display process file info
pidof - Find the process ID of a running program
pinfo - Display all process info
pmodules - Display process module info
ps - Show process status
quit - Terminate the shell
route - Kernel IP routing table
set - Set system properties
sleep - Delay execution for the a number of seconds
source - Read a file, executing the contents
sysinfo - Display system information
time - Time command
ulimit - Display system resource limits
uptime - Display how long the system has been running
version - Display sigar and system version info
who - Show who is logged on
sigar> ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2097438 errors:0 dropped:0 overruns:0 frame:0
TX packets:2097438 errors:0 dropped:0 overruns:0 carrier:0
collisions:0
RX bytes:437264670 (417M) TX bytes:437264670 (417M)
wlan0 Link encap:Ethernet HWaddr 00:1C:BF:8A:DC:B2
inet addr:192.168.5.134 Bcast:192.168.5.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1492 Metric:1
RX packets:2087979 errors:0 dropped:0 overruns:0 frame:0
TX packets:1284336 errors:0 dropped:0 overruns:0 carrier:0
collisions:0
RX bytes:2570840991 (2.4G) TX bytes:309761423 (295M)
tun0 Link encap:Ethernet
inet addr:10.3.113.45 P-t-P:255.255.255.0 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:2106 errors:0 dropped:0 overruns:0 frame:0
TX packets:1843 errors:0 dropped:0 overruns:0 carrier:0
collisions:0
RX bytes:2266008 (2.2M) TX bytes:168653 (165K)
eth0 Link encap:Ethernet HWaddr 00:1E:37:88:38:42
inet addr:0.0.0.0 Bcast:0.0.0.0 Mask:0.0.0.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0
RX bytes:0 ( 0 ) TX bytes:0 ( 0 )
sigar> netinfo
primary interface.....wlan0
primary ip address....192.168.5.134
primary mac address...00:1C:BF:8A:DC:B2
primary netmask.......255.255.255.0
host name.............localhost.localdomain
domain name...........(none)
default gateway.......192.168.5.1
primary dns...........172.16.52.28
secondary dns.........10.11.255.27
sigar> netinfo wlan0
netinfo: Syntax: netinfo
sigar> netinfo
primary interface.....wlan0
primary ip address....192.168.5.134
primary mac address...00:1C:BF:8A:DC:B2
primary netmask.......255.255.255.0
host name.............localhost.localdomain
domain name...........(none)
default gateway.......192.168.5.1
primary dns...........172.16.52.28
secondary dns.........10.11.255.27
My thoughts is that it provides most of the stuff Matahari does at this time and
I didn't find a way to actually administer a device (shutdown network interfaces).
I honestly do not see a major benefit of including this library (perhaps some code
snippets at best).