sysinfo

Package: WA2L/edrc 1.5.57
Section: General Commands (1)
Updated: 12 January 2009
Index Return to Main Contents

 

NAME

sysinfo - print information on overall system statistics

 

SYNOPSIS

edrc/bin/sysinfo [ -h | -a ]

sysinfo [ -u | -l | -r | -s | -n ]

 

AVAILABILITY

WA2L/edrc

 

DESCRIPTION

With the sysinfo command information about the overall system statistics is printed.

If called with the -a option, all overall statistics information is provided in a plain human readable format.

However, the main purpose of the sysinfo command is to print out dedicated information with the options -u, -l, -r, -s or -n. The output of those options is formatted in a fashion that it is possible to compute it easily with other commands.

Especially the output of the uptime(1) command provided by the operating system is often very hard to use for further data processing, due to the fact that the output changes completely depending on the point in time when called. Therefore the output of sysinfo -u is much easier to process.

The format of all outputs ( except -a ) is:

        <date>;<seconds since Epoch>{;<value>}

Example ( sysinfo -u ):

        2006-09-30 00:04:50;1159567490;349541

 

OPTIONS

-h
usage message.

-a
all overall system statistics information in a plain human readable format. This output is not intended for further data processing.

-u
uptime (=time since last boot) in seconds [one value field].

-l
1, 5 and 15 minute load average [three value fields].

-r
total usable main memory, total available memory, amount of shared memory and memory used by buffers in bytes [four value fields].

-s
total swap space and swap space still available in bytes [two value fields].

-n
number of current processes [one value field].

 

EXIT STATUS

0
no error.

1
the system call to resolve a certain value did not succeed. See accompanied error message for more detailed information.

4
usage displayed.

99
functionality not implemented yet.

 

FILES

The files involved to resolve the information are operating system dependent.

/var/adm/utmp
uptime on HP-UX.

 

EXAMPLES

The following examples is the result if all commands are executed at the same time.

0) system information

[ /opt/edrc/bin ]
[ root@rh7mzv7t001 ][*edrc*/bash]: uname -a 

Linux rh7mzv7t001 2.4.7-10 #1 Thu Sep 9 00:25:31 EDT 2006 i686 unknown

1) plain output

[ /opt/edrc/bin ]
[ root@rh7mzv7t001 ][*edrc*/bash]: sysinfo -a

Date: 2006-09-30
Time: 00:25:31
Seconds since Epoch: 1159568731
Uptime: 4days, 1hours, 26minutes, 22seconds
Load Avgs: 1min(22240) 5min(6816) 15min(1952)
Total Ram: 513304k      Free: 76808k
Shared Ram: 0k
Buffered Ram: 104016k
Total Swap: 409616k     Free: 409616k
Number of processes: 78

2) uptime

[ /opt/edrc/bin ]
[ root@rh7mzv7t001 ][*edrc*/bash]: sysinfo -u

2006-09-30 00:25:31;1159568731;350782

[ /opt/edrc/bin ]
[ root@rh7mzv7t001 ][*edrc*/bash]: uptime 

12:25am  up 4 days,  1:26,  2 users,  load average: 0.34, 0.10, 0.03

3) system load averages

[ /opt/edrc/bin ]
[ root@rh7mzv7t001 ][*edrc*/bash]: sysinfo -l

2006-09-30 00:25:31;1159568731;22240;6816;1952

4) RAM

[ /opt/edrc/bin ]
[ root@rh7mzv7t001 ][*edrc*/bash]: sysinfo -r

2006-09-30 00:25:31;1159568731;525623296;78651392;0;106512384

5) swap

[ /opt/edrc/bin ]
[ root@rh7mzv7t001 ][*edrc*/bash]: sysinfo -s

2006-09-30 00:25:31;1159568731;419446784;419446784

6) processes

[ /opt/edrc/bin ]
[ root@rh7mzv7t001 ][*edrc*/bash]: sysinfo -n

2006-09-30 00:25:31;1159568731;78

 

SEE ALSO

ctime(3), date(1), edrcintro(1), sysinfo(2), sed(1), time(2), timer(1), uptime(1), utmp(5)

 

NOTES

The sysinfo command was derived from the source code example sysinfo.c provided by <detour@metalshell.com> on http://www.metalshell.com and has been enhanced by Christian Walther. See http://www.metalshell.com for additional coding examples.

 

BUGS

The field deliminator is fixated to ; and is therefore not changeable with a command line option, yet. As a workaround the following command sequence can be issued:
sysinfo -u | sed -e 's/;/ deliminator /g'

Not all options or functions are implemented on all operating systems. The table below lists the options currently implemented for a certain operating system:

 _________________________________________________
| OSID         |  -u  |  -l  |  -r  |  -s  | -n   |
|--------------|------|------|------|------|------|
| Linux        | YES  | YES  | YES  | YES  | YES  |
| HP-10        | YES  |  NO  |  NO  |  NO  |  NO  |
| HP-11        | YES  |  NO  |  NO  |  NO  |  NO  |
| HP-11i       | YES  |  NO  |  NO  |  NO  |  NO  |
| Solaris      | YES  |  NO  |  NO  |  NO  |  NO  |
|______________|______|______|______|______|______|

 

AUTHOR

sysinfo was developed by Christian Walther. Send suggestions and bug reports to wa2l@users.sourceforge.net .

 

COPYRIGHT

Copyright © 2009 Christian Walther

This is free software; see edrc/doc/COPYING for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


 

Index

NAME
SYNOPSIS
AVAILABILITY
DESCRIPTION
OPTIONS
EXIT STATUS
FILES
EXAMPLES
SEE ALSO
NOTES
BUGS
AUTHOR
COPYRIGHT

This document was created by man2html using the manual pages.
Time: 00:14:27 GMT, March 08, 2025