1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149
|
SINFO is a system to distribute system information of every host on your local
network (via UDP).
It provides
system load,
memory usage
and
the top-5 running processes
in a similar manner as top(1).
It uses a minimal network bandwidth because of the broadcasting scheme used.
The demon needs not to be run as a root (exception FreeBSD)
- so there will be no security-risk.
sinfo should work on
* linux 2.4.x, 2.6.x
* (FreeBSD 8.2 ... partly)
* (solaris 2.8 tested up to 0.0.14)
QUICKSTART:
==========
export CXXFLAGS=-O3 # its better to enable optimization!
./configure
make
make install-strip # or "make install" if you want to waste some
# disk-space.
sinfod # (sinfod should be run at system startup)
sinfo
additional configure options
============================
--enable-SINFO_REQUEST_PORT=n
set the UDP REQUEST port used by sinfo to n 60002
--enable-SINFO_BROADCAST_PORT=n
set the UDP broadcast port used by sinfo to n
60003
--enable-SIMPLE_USER_CACHE
enable a simple cache for user name lookups
--enable-CPUNO_ADJUST adjust the number of cpus for hyperthreading
machines
sinfo access through your web server
====================================
After "make" you'll find a sample cgi-script
./cgi/sinfo.pl.cgi
You should move this script to the cgi-bin path of your web server. This perl
script calls "/usr/local/bin/sinfo -Wq" to produce html-output.
The path to sinfo (e.g. /usr/local/bin/sinfo ) is set during the run of
./configure according to --prefix resp. --exec_prefix.
Sinfo produces a very rudimentary html-output that has to be included in a
complete html page. This procedure lets you adopt the output output of sinfo
to your favored look and feel. Use ./cgi/sinfo.pl.cgi as a starting
point for your customizations.
TROUBLESHOOTING:
===============
compile problems:
* If you have an old ncurses library it may be necessary to set
export CXXFLAGS=-fpermissive
* If you have more than one curses.h file laying around in you
include-paths be sure to use the correct one by sorting the
entries in CPLUS_INCLUDE_PATH.
i.e. Solaris 8 normally needs: CPLUS_INCLUDE_PATH=/opt/sfw/include:...
ln -s /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/include/math.h
ln -s /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/include/curses.h
* On FreeBSD 8.2
Your need to make sure that
automake, boost and asio from the ports collection
(the port collection can be installed with sysinstall)
are installed:
cd /usr/ports
devel/automake
devel/boost
net/asio
make install clean
unpack sinfo
tar -xvzf sinfo-x.y.z.tar.gz
cd sinfo-x.y.z
And change
-lboost_signals-mt
to
-lboost_signals
in
sinfo/Makefile.am
and
sinfod/Makefile.am
./configure
CPLUS_INCLUDE_PATH=/usr/local/include LIBRARY_PATH=/usr/local/lib make
will compile the program for you
* your might even have to set
CXXFLAGS=-fpermissive
to change the "ANSI C++ conversation error" into a warning
that is produced by #including < >
/usr/include/sys/user.h:53,
-> /usr/include/vm/vm_map.h
runtime problems:
* On FreeBSD systems sinfod has to be run as root.
* sinfod --bcastaddress 127.0.0.1
may be necessary if you are running sinfod on a computer that is
not part of a LAN.
FILES:
=====
/usr/local/bin/sinfo ................ the user program
/usr/local/sbin/sinfod ............... the demon
Some scripts to start a program on all computers on your network:
/usr/local/bin/sshallsinfo ...... use ssh and get the list of hosts via "sinfo -Hq"
/usr/local/man/man1/sinfo.1 .......... man-pages
/usr/local/man/man1/sshallsinfo.1
/usr/local/man/man8/sinfod.8
not installed:
./cgi/sinfo.pl.cgi ... a sample perl-CGI-script for HTML-output ...
change to your needs and move to your cgi-bin directory
Juergen Rinas <jrinas@gmx.de>
|