Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 176635

Summary: symon-2.79.ebuild (New Package)
Product: Gentoo Linux Reporter: Tiago Cunha (RETIRED) <tcunha>
Component: New packagesAssignee: Peter Volkov (RETIRED) <pva>
Status: RESOLVED FIXED    
Severity: enhancement Keywords: EBUILD, InOverlay
Priority: High    
Version: 2008.0   
Hardware: All   
OS: Linux   
URL: http://www.xs4all.nl/~wpd/symon/
Whiteboard: [sunrise-overlay]
Package list:
Runtime testing required: ---
Attachments: symon-2.75.ebuild
symon-init.d
symon-symon.conf.patch
symon-symux.conf.patch
symon-syweb-class_lexer.inc.patch
symon-syweb-setup.inc.patch
symon-syweb-total_firewall.layout.patch
symon-2.77.ebuild
symon-symon.conf.patch
symon-symux.conf.patch

Description Tiago Cunha (RETIRED) gentoo-dev 2007-04-30 23:05:36 UTC
symon is a lightweight system monitor. Can be run with privileges equivalent to nobody on the monitored host (chroot'ed). Offers no functionality but monitoring and forwarding of measured data.

It consists of symon itself and symux which stores on disk the rrd files from incoming streams by symon. symux offers systems statistics as they come in to 3rd party clients.

I also included a USE="syweb" since this kind of net-analyzers only makes sense with a www app to the regular user - there's a perl script (which I decided not to install) that dumps for example, the percentage of cpu used.

The purpose of each patch are included - i.e. commented - inside of it.

Stuff that I'd like to see implemented in the future:

1. make symon chroot by default - this implies creating the /dev/null character device and mounting /proc inside symon's home directory (/var/empty?), also changes to the paths must be made and a enewuser is necessary too. By this I think a USE flag nochroot should be provided to the user.
2. add IUSE="symon-only symux-only" - i.e. build/install only symon/symux - since it makes sense in some environments - e.g. embedded, gateways, firewalls, etc.

It was tested with apache-2.0.58-r2 and php-5.2.1-r3.

TIA.
Comment 1 Tiago Cunha (RETIRED) gentoo-dev 2007-04-30 23:06:59 UTC
Created attachment 117793 [details]
symon-2.75.ebuild
Comment 2 Tiago Cunha (RETIRED) gentoo-dev 2007-04-30 23:07:34 UTC
Created attachment 117795 [details]
symon-init.d
Comment 3 Tiago Cunha (RETIRED) gentoo-dev 2007-04-30 23:09:12 UTC
Created attachment 117797 [details, diff]
symon-symon.conf.patch
Comment 4 Tiago Cunha (RETIRED) gentoo-dev 2007-04-30 23:09:49 UTC
Created attachment 117798 [details, diff]
symon-symux.conf.patch
Comment 5 Tiago Cunha (RETIRED) gentoo-dev 2007-04-30 23:10:15 UTC
Created attachment 117800 [details, diff]
symon-syweb-class_lexer.inc.patch
Comment 6 Tiago Cunha (RETIRED) gentoo-dev 2007-04-30 23:10:37 UTC
Created attachment 117802 [details, diff]
symon-syweb-setup.inc.patch
Comment 7 Tiago Cunha (RETIRED) gentoo-dev 2007-04-30 23:11:00 UTC
Created attachment 117804 [details, diff]
symon-syweb-total_firewall.layout.patch
Comment 8 Tiago Cunha (RETIRED) gentoo-dev 2007-07-14 18:36:04 UTC
symon-2.76 is out. Renaming the ebuild/patches works.

Portage 2.1.2.9 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.5-r4, 2.6.21-gentoo-r4 i686)
=================================================================
System uname: 2.6.21-gentoo-r4 i686 Intel(R) Pentium(R) 4 CPU 1.70GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Sat, 14 Jul 2007 03:50:01 +0000
ccache version 2.4 [enabled]
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r7
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/init.d /etc/php/apache1-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=pentium4 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg ccache collision-protect distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms strict test userfetch userpriv usersandbox"
GENTOO_MIRRORS="ftp://mirrors1.netvisao.pt/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="acl apache2 bitmap-fonts cli cracklib crypt cups dri fortran iconv isdnlog libg++ logrotate midi mudflap mysql ncurses nptl nptlonly openmp pam pcre perl pppd python readline reflection session spl ssl tcpd test truetype-fonts type1-fonts x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 9 Tiago Cunha (RETIRED) gentoo-dev 2007-12-31 18:06:06 UTC
Created attachment 139748 [details]
symon-2.77.ebuild

Changes made:

1. Keep variables ordered.
2. Syweb updated.
3. ~sparc keyword added and ~x86 removed since I don't own that machine anymore.
4. Patches renamed from ${P} to ${PN} since upstream doesn't change (much) the files across releases.
5. More information added to the logs to take advantage of the new features of this release.

Portage 2.1.3.19 (default-linux/sparc/sparc64/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.23-gentoo-r3 sparc64)
=================================================================
System uname: 2.6.23-gentoo-r3 sparc64 sun4u
Timestamp of tree: Sun, 30 Dec 2007 14:46:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r2
ACCEPT_KEYWORDS="sparc"
CBUILD="sparc-unknown-linux-gnu"
CFLAGS="-O2 -mcpu=ultrasparc -pipe"
CHOST="sparc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/init.d /etc/pam.d /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -mcpu=ultrasparc -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="-akv"
FEATURES="ccache collision-protect distlocks metadata-transfer parallel-fetch sandbox sfperms strict test unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp.rnl.ist.utl.pt/pub/gentoo http://darkstar.ist.utl.pt/pub/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X acl bash-completion bitmap-fonts branding bzip2 cli cracklib crypt dbus dri fortran gdbm gif gnome gtk hal iconv ipv6 isdnlog jpeg logrotate midi mudflap ncurses nptl nptlonly offensive opengl openmp pam pcre perl png postgres ppds pppd python readline reflection session sparc spl ssl tcpd test tiff truetype truetype-fonts type1-fonts xml xorg zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="sunffb"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 10 Tiago Cunha (RETIRED) gentoo-dev 2008-01-05 13:51:34 UTC
Comment on attachment 117797 [details, diff]
symon-symon.conf.patch

><HTML><HEAD/><BODY><PRE># convert bsd devices to linux
># mbuf, sensor, and proc still not available in linux
>
>--- symon/symon/symon.conf.orig 2007-12-31 16:56:38.322746920 +0000
>+++ symon/symon/symon.conf      2007-12-31 16:58:39.625398962 +0000
>@@ -4,12 +4,9 @@
> # Demo configuration for symon. See symon(8) for BNF.
>
> monitor { cpu(0),  mem,
>-         if(lo0),
>-#        pf,
>-#         mbuf,
>-#         sensor(0),
>-#         proc(httpd),
>-#         if(xl0), if(de0), if(wi0),
>-#        io(wd1), io(wd2), io(wd3), io(cd0)
>-         io(wd0)
>+       if(lo),
>+       if(eth0),
>+#      if(eth1)
>+#      io(hda), io(hdb), io(hdc), io(hdd)
>+       io(sda), io(sdb)
> } stream to 127.0.0.1 2100
></PRE></BODY></HTML>
Comment 11 Tiago Cunha (RETIRED) gentoo-dev 2008-01-05 13:56:35 UTC
Created attachment 140180 [details, diff]
symon-symon.conf.patch
Comment 12 Tiago Cunha (RETIRED) gentoo-dev 2008-01-05 13:57:05 UTC
Created attachment 140181 [details, diff]
symon-symux.conf.patch
Comment 13 Tiago Cunha (RETIRED) gentoo-dev 2008-01-09 02:02:45 UTC
This is now in the sunrise overlay. You can find it at:
http://overlays.gentoo.org/svn/proj/sunrise/reviewed/net-analyzer/symon

Changes made:

1. Version bump.
2. Use flag 'symux' added. The ebuild by default only installs the monitor (makes sense in some environments - e.g. embedded, gateways, firewalls,
etc.). If the user wants to generate the RRDs he/she should specify the USE flag 'symux'.
Comment 14 Tiago Cunha (RETIRED) gentoo-dev 2008-01-13 19:18:47 UTC
A new version of the ebuild was recently reviewed.
Changes made since 09 Jan 2008:

1. Fix hardcoded CC.
2. Honour Gentoo CFLAGS.
3. Avoid pre-stripping.
Comment 15 Tiago Cunha (RETIRED) gentoo-dev 2008-02-18 22:36:53 UTC
A new version of the ebuild was recently reviewed.
Changes made since 10 Jan 2008:

1. Handle CC/CFLAGS/STRIP in a different way. Instead of using sed, just set
the variables when using emake.
2. Depend on net in the init scripts.
3. Use flag 'client' added. If specified a generic perl symux client will be
installed. Could, for instance, be used to get the hourly amount of data that
was transmitted on a particular interface.
4. Minor cosmetic changes -- variables, sed expressions, etc.
Comment 16 Tiago Cunha (RETIRED) gentoo-dev 2008-04-09 22:29:27 UTC
A new version of the ebuild was recently reviewed.
Changes made since 18 Fev 2008:

1. Version bump (syweb too).
2. Missing pkg_prerm added, thanks to jakub@g.o.
3. Use the new features provided by the webapp eclass, thanks to jakub@g.o.
4. Minor cosmetic changes.
Comment 17 Tiago Cunha (RETIRED) gentoo-dev 2008-07-29 20:27:01 UTC
A new version of the ebuild was recently reviewed.
Changes made since 09 Apr 2008:

1. Respect AR, and RANLIB.
2. Use flag 'client' renamed to 'perl'.
3. Elog messages improved, and while there add a message about migrating RRDs from a previous symux version.
4. Minor cosmetic changes.
Comment 18 Tiago Cunha (RETIRED) gentoo-dev 2008-08-02 21:22:41 UTC
A new version of the ebuild was recently reviewed.
Changes made since 29 Jul 2008:

1. Elog messages improved to help the user configure symon.
2. Ignore MAKEOPTS since symon uses pmake.
Comment 19 Tiago Cunha (RETIRED) gentoo-dev 2008-08-08 17:16:33 UTC
A new version of the ebuild was recently reviewed.
Changes made since 02 Aug 2008:

1. Install syweb documentation (CHANGELOG, and README).
2. Again, improve elog messages by saying how to customize syweb, and mention that there's a no user interaction php script.
Comment 20 Peter Volkov (RETIRED) gentoo-dev 2008-08-19 07:03:55 UTC
Commited to the tree. Thank you this work, Tiago.