INSTALL 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. Installation notes
  2. ==================
  3. Privileges
  4. ==========
  5. symux needs read and write access to its rrdfiles.
  6. symon needs to interface with your kernel. Depending on your host system this
  7. leads to different privilege requirements:
  8. OpenBSD: - no privs: cpu, debug, df, if, io, mbuf, mem, proc, sensor
  9. - rw on /dev/pf for pf
  10. NetBSD: - no privs: cpu, debug, df, if, io, mbuf, proc
  11. - r on /dev/sysmon for sensor
  12. FreeBSD: - no privs: all
  13. - non-chroot on FreeBSD 5.x for CPU ticks in proc
  14. - rw on /dev/pf for pf and pfq
  15. Linux: - r on /proc/net/dev: if
  16. - r on /proc/stat: cpu, cpuiow
  17. - r on /proc/meminfo: mem
  18. all:
  19. - r on chroot/etc/localtime for proper timezone logging
  20. Real quick on OpenBSD
  21. =====================
  22. (cd /usr/ports/net/rrdtool && make install) &&
  23. make &&
  24. make install &&
  25. vi /etc/symux.conf /etc/symon.conf &&
  26. ~symon/symux/c_smrrds.sh all &&
  27. /usr/local/libexec/symux &&
  28. useradd -d /var/empty -L daemon -c 'symon Account' -s /sbin/nologin _symon
  29. /usr/local/libexec/symon
  30. or grab the port and do
  31. make package
  32. pkg_add symon-mon-version.tgz on all monitored hosts
  33. pkg_add symon-mux-version.tgz on the loghost
  34. Install the seperate syweb package to show the data stored in the rrd files.
  35. Less quick, but all OSes
  36. ========================
  37. - Install rrdtool on the host that will also run your symux gatherer.
  38. BSDs: cd /usr/ports/net/rrdtool && make install
  39. - Check Makefile.inc for settings. Things to watch out for are:
  40. + PREFIX = Where does the installation tree start. Defaults to
  41. '/usr/local'.
  42. + BINDIR = Where should the daemons be put, relative to $PREFIX. Defaults
  43. to 'libexec'.
  44. + MANDIR = Where should the manuals be installed, relative to
  45. $PREFIX. Defaults to 'man'.
  46. + SHRDIR = Where are the example configurations to be installed. Defaults
  47. to 'share/symon'.
  48. + RRDDIR = $RRDDIR/include should yield rrd.h. Define SYMON_ONLY in the
  49. environment or on the make command line to render this mute.
  50. + INSTALLUSER / GROUPDIR / GROUPFILE = user and groups that install should
  51. use.
  52. Note that:
  53. + you can define SYMON_ONLY if you do not want to compile symux / do not
  54. have rrdtool installed.
  55. + symon/platform/os/Makefile.inc is read before Makefile.inc; define
  56. your vars in the environment, or in Makefile.inc with != to force
  57. overwriting the defaults.
  58. BSDs: Run make && make install
  59. Linux: Run pmake && pmake install || bmake && bmake install
  60. - Create an '/etc/symon.conf' for each monitored host and one symux.conf for
  61. the gatherer host. See the manual pages on how to specify alternative
  62. configuration file locations, if necessary. Note that there are example
  63. configurations for both in $PREFIX/$SHRDIR.
  64. - Create the rrd files where the incoming symon data is to be
  65. stored. $PREFIX/$SHRDIR/c_smrrds.sh and symux -l are your friends. Note that
  66. syweb expects an '.../machine/*.rrd' style directory structure somewhere
  67. under /var/www.
  68. - Ensure that /etc/localtime is accessible by symon/symux. Failing this you
  69. will get log messages in GMT. Note that etc is chroot/etc when symon
  70. chroots.
  71. - Both symon and symux will daemonize if started normally. Start them with
  72. debugging on initially to iron out any configuration problems:
  73. $PREFIX/$BINDIR/symux -d &
  74. $PREFIX/$BINDIR/symon -d
  75. - Remove -d flags and check system logs for any failures.
  76. - Only if you need the webinterface: download and install syweb.
  77. Getting measurements without the web
  78. ====================================
  79. The client directory contains a perl module 'SymuxClient.pm' that can be used
  80. to read measurements as they come in at the symux host. A sample Perl program
  81. called 'getsymonitem.pl' shows how to use the module.
  82. Example:
  83. nexus$ getsymonitem.pl 127.0.0.1 2100 127.0.0.1 "cpu(0)" "idle"
  84. 93.40
  85. Historical data can be gathered using rrdfetch(1) from symux's rrd files.
  86. Portability
  87. ===========
  88. This package was originally built as an OpenBSD application. It now has support
  89. for FreeBSD, NetBSD and Linux.
  90. Willem Dijkstra - wpd@xs4all.nl