diff options
author | James Meyer <james.meyer@operamail.com> | 2008-11-09 02:35:27 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2008-11-09 02:35:27 (GMT) |
commit | abc83d46637ebc63479ec745f05ae392f404f04e (patch) | |
tree | 49bab12f11126552a0dcaaeea5c36acf5697fa00 /abs/mv-core/hobbit-client/client/bin | |
parent | d250b09f45562edf2be94fa330e312dccc0832d8 (diff) | |
download | linhes_pkgbuild-abc83d46637ebc63479ec745f05ae392f404f04e.zip linhes_pkgbuild-abc83d46637ebc63479ec745f05ae392f404f04e.tar.gz linhes_pkgbuild-abc83d46637ebc63479ec745f05ae392f404f04e.tar.bz2 |
hobbit client
Diffstat (limited to 'abs/mv-core/hobbit-client/client/bin')
22 files changed, 811 insertions, 0 deletions
diff --git a/abs/mv-core/hobbit-client/client/bin/bb b/abs/mv-core/hobbit-client/client/bin/bb Binary files differnew file mode 100755 index 0000000..1202ab4 --- /dev/null +++ b/abs/mv-core/hobbit-client/client/bin/bb diff --git a/abs/mv-core/hobbit-client/client/bin/bbcmd b/abs/mv-core/hobbit-client/client/bin/bbcmd Binary files differnew file mode 100755 index 0000000..3dd325b --- /dev/null +++ b/abs/mv-core/hobbit-client/client/bin/bbcmd diff --git a/abs/mv-core/hobbit-client/client/bin/bbdigest b/abs/mv-core/hobbit-client/client/bin/bbdigest Binary files differnew file mode 100755 index 0000000..9f607e9 --- /dev/null +++ b/abs/mv-core/hobbit-client/client/bin/bbdigest diff --git a/abs/mv-core/hobbit-client/client/bin/bbhostgrep b/abs/mv-core/hobbit-client/client/bin/bbhostgrep Binary files differnew file mode 100755 index 0000000..e981aee --- /dev/null +++ b/abs/mv-core/hobbit-client/client/bin/bbhostgrep diff --git a/abs/mv-core/hobbit-client/client/bin/bbhostshow b/abs/mv-core/hobbit-client/client/bin/bbhostshow Binary files differnew file mode 100755 index 0000000..2157ccb --- /dev/null +++ b/abs/mv-core/hobbit-client/client/bin/bbhostshow diff --git a/abs/mv-core/hobbit-client/client/bin/clientupdate b/abs/mv-core/hobbit-client/client/bin/clientupdate Binary files differnew file mode 100755 index 0000000..9db22bd --- /dev/null +++ b/abs/mv-core/hobbit-client/client/bin/clientupdate diff --git a/abs/mv-core/hobbit-client/client/bin/hobbitclient-aix.sh b/abs/mv-core/hobbit-client/client/bin/hobbitclient-aix.sh new file mode 100755 index 0000000..d1a0dc2 --- /dev/null +++ b/abs/mv-core/hobbit-client/client/bin/hobbitclient-aix.sh @@ -0,0 +1,66 @@ +#!/bin/sh +#----------------------------------------------------------------------------# +# AIX client for Hobbit # +# # +# Copyright (C) 2005-2006 Henrik Storner <henrik@hswn.dk> # +# # +# This program is released under the GNU General Public License (GPL), # +# version 2. See the file "COPYING" for details. # +# # +#----------------------------------------------------------------------------# +# +# $Id: hobbitclient-aix.sh,v 1.14 2006/07/05 05:52:22 henrik Rel $ + +echo "[date]" +date +echo "[uname]" +uname -a +echo "[uptime]" +uptime +echo "[who]" +who +echo "[df]" +# The sed stuff is to make sure lines are not split into two. +df -Ik | sed -e '/^[^ ][^ ]*$/{ +N +s/[ ]*\n[ ]*/ / +}' +echo "[mount]" +mount +echo "[realmem]" +lsattr -El sys0 -a realmem +echo "[freemem]" +vmstat 1 2 | tail -1 +echo "[swap]" +lsps -s +echo "[ifconfig]" +ifconfig -a +echo "[route]" +netstat -r +echo "[netstat]" +netstat -s +echo "[ports]" +netstat -an | grep "^tcp" +echo "[ifstat]" +netstat -v +echo "[ps]" +# I think the -f and -l options are ignored with -o, but this works... +ps -A -k -f -l -o pid,ppid,user,stat,pri,pcpu,time,etime,pmem,vsz,args + +# $TOP must be set, the install utility should do that for us if it exists. +if test "$TOP" != "" +then + if test -x "$TOP" + then + echo "[top]" + $TOP -b 20 + fi +fi + +# vmstat +nohup sh -c "vmstat 300 2 1>$BBTMP/hobbit_vmstat.$MACHINEDOTS.$$ 2>&1; mv $BBTMP/hobbit_vmstat.$MACHINEDOTS.$$ $BBTMP/hobbit_vmstat.$MACHINEDOTS" </dev/null >/dev/null 2>&1 & +sleep 5 +if test -f $BBTMP/hobbit_vmstat.$MACHINEDOTS; then echo "[vmstat]"; cat $BBTMP/hobbit_vmstat.$MACHINEDOTS; rm -f $BBTMP/hobbit_vmstat.$MACHINEDOTS; fi + +exit + diff --git a/abs/mv-core/hobbit-client/client/bin/hobbitclient-darwin.sh b/abs/mv-core/hobbit-client/client/bin/hobbitclient-darwin.sh new file mode 100755 index 0000000..600a31f --- /dev/null +++ b/abs/mv-core/hobbit-client/client/bin/hobbitclient-darwin.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# +#----------------------------------------------------------------------------# +# Darwin (Mac OS X) client for Hobbit # +# # +# Copyright (C) 2005-2006 Henrik Storner <henrik@hswn.dk> # +# # +# This program is released under the GNU General Public License (GPL), # +# version 2. See the file "COPYING" for details. # +# # +#----------------------------------------------------------------------------# +# +# $Id: hobbitclient-darwin.sh,v 1.17 2006/07/05 05:52:22 henrik Rel $ + +echo "[date]" +date +echo "[uname]" +uname -a +echo "[uptime]" +uptime +echo "[who]" +who +echo "[df]" +# The sed stuff is to make sure lines are not split into two. +df -H -t nonfs,nullfs,cd9660,procfs,volfs,devfs,fdesc | sed -e '/^[^ ][^ ]*$/{ +N +s/[ ]*\n[ ]*/ / +}' +echo "[mount]" +mount +echo "[meminfo]" +vm_stat +echo "[ifconfig]" +ifconfig -a +echo "[route]" +netstat -r +echo "[netstat]" +netstat -s +echo "[ifstat]" +netstat -ibn | egrep -v "^lo|<Link" +echo "[ports]" +netstat -an|grep "^tcp" +echo "[ps]" +ps -ax -ww -o pid,ppid,user,start,state,pri,pcpu,time,pmem,rss,vsz,command + +# $TOP must be set, the install utility should do that for us if it exists. +if test "$TOP" != "" +then + if test -x "$TOP" + then + echo "[top]" + $TOP -l 1 -n 20 + fi +fi + +exit + diff --git a/abs/mv-core/hobbit-client/client/bin/hobbitclient-freebsd.sh b/abs/mv-core/hobbit-client/client/bin/hobbitclient-freebsd.sh new file mode 100755 index 0000000..bc30c5a --- /dev/null +++ b/abs/mv-core/hobbit-client/client/bin/hobbitclient-freebsd.sh @@ -0,0 +1,65 @@ +#!/bin/sh +# +#----------------------------------------------------------------------------# +# FreeBSD client for Hobbit # +# # +# Copyright (C) 2005-2006 Henrik Storner <henrik@hswn.dk> # +# # +# This program is released under the GNU General Public License (GPL), # +# version 2. See the file "COPYING" for details. # +# # +#----------------------------------------------------------------------------# +# +# $Id: hobbitclient-freebsd.sh,v 1.17 2006/07/05 05:52:22 henrik Rel $ + +echo "[date]" +date +echo "[uname]" +uname -a +echo "[uptime]" +uptime +echo "[who]" +who +echo "[df]" +# The sed stuff is to make sure lines are not split into two. +df -H -tnonfs,nullfs,cd9660,procfs,devfs,linprocfs | sed -e '/^[^ ][^ ]*$/{ +N +s/[ ]*\n[ ]*/ / +}' +echo "[mount]" +mount +echo "[meminfo]" +$BBHOME/bin/freebsd-meminfo +echo "[swapinfo]" +swapinfo -k +echo "[ifconfig]" +ifconfig -a +echo "[route]" +netstat -rn +echo "[ifstat]" +netstat -i -b -n | egrep -v "^lo|<Link" +echo "[netstat]" +netstat -s +echo "[ports]" +(netstat -na -f inet; netstat -na -f inet6) | grep "^tcp" +echo "[ps]" +# Dont use "args". "command" works also in FreeBSD 4.x. +ps -ax -ww -o pid,ppid,user,start,state,pri,pcpu,cputime,pmem,rss,vsz,command + +# $TOP must be set, the install utility should do that for us if it exists. +if test "$TOP" != "" +then + if test -x "$TOP" + then + echo "[top]" + $TOP -n 20 + fi +fi + +# vmstat +nohup sh -c "vmstat 300 2 1>$BBTMP/hobbit_vmstat.$MACHINEDOTS.$$ 2>&1; mv $BBTMP/hobbit_vmstat.$MACHINEDOTS.$$ $BBTMP/hobbit_vmstat.$MACHINEDOTS" </dev/null >/dev/null 2>&1 & +sleep 5 +if test -f $BBTMP/hobbit_vmstat.$MACHINEDOTS; then echo "[vmstat]"; cat $BBTMP/hobbit_vmstat.$MACHINEDOTS; rm -f $BBTMP/hobbit_vmstat.$MACHINEDOTS; fi + +exit + diff --git a/abs/mv-core/hobbit-client/client/bin/hobbitclient-hp-ux.sh b/abs/mv-core/hobbit-client/client/bin/hobbitclient-hp-ux.sh new file mode 100755 index 0000000..54302fa --- /dev/null +++ b/abs/mv-core/hobbit-client/client/bin/hobbitclient-hp-ux.sh @@ -0,0 +1,67 @@ +#!/bin/sh +# +#----------------------------------------------------------------------------# +# HP-UX client for Hobbit # +# # +# Copyright (C) 2005-2006 Henrik Storner <henrik@hswn.dk> # +# # +# This program is released under the GNU General Public License (GPL), # +# version 2. See the file "COPYING" for details. # +# # +#----------------------------------------------------------------------------# +# +# $Id: hobbitclient-hp-ux.sh,v 1.20 2006/07/05 05:52:22 henrik Rel $ + +echo "[date]" +date +echo "[uname]" +uname -a +echo "[uptime]" +uptime +echo "[who]" +who +echo "[df]" +# The sed stuff is to make sure lines are not split into two. +df -Pk | sed -e '/^[^ ][^ ]*$/{ +N +s/[ ]*\n[ ]*/ / +}' +echo "[mount]" +mount +echo "[memory]" +$BBHOME/bin/hpux-meminfo +echo "[swapinfo]" +/usr/sbin/swapinfo -tm +echo "[ifconfig]" +netstat -in +echo "[route]" +netstat -rn +echo "[netstat]" +netstat -s +echo "[ifstat]" +/usr/sbin/lanscan -p | while read PPA; do /usr/sbin/lanadmin -g mibstats $PPA; done +echo "[ports]" +netstat -an | grep "^tcp" +echo "[ps]" +UNIX95=1 ps -Ax -o pid,ppid,user,stime,state,pri,pcpu,time,vsz,args + +# $TOP must be set, the install utility should do that for us if it exists. +if test "$TOP" != "" +then + if test -x "$TOP" + then + echo "[top]" + # Cits Bogajewski 03-08-2005: redirect of top fails + $TOP -d 1 -f $BBHOME/tmp/top.OUT + cat $BBHOME/tmp/top.OUT + rm $BBHOME/tmp/top.OUT + fi +fi + +# vmstat +nohup sh -c "vmstat 300 2 1>$BBTMP/hobbit_vmstat.$MACHINEDOTS.$$ 2>&1; mv $BBTMP/hobbit_vmstat.$MACHINEDOTS.$$ $BBTMP/hobbit_vmstat.$MACHINEDOTS" </dev/null >/dev/null 2>&1 & +sleep 5 +if test -f $BBTMP/hobbit_vmstat.$MACHINEDOTS; then echo "[vmstat]"; cat $BBTMP/hobbit_vmstat.$MACHINEDOTS; rm -f $BBTMP/hobbit_vmstat.$MACHINEDOTS; fi + +exit + diff --git a/abs/mv-core/hobbit-client/client/bin/hobbitclient-irix.sh b/abs/mv-core/hobbit-client/client/bin/hobbitclient-irix.sh new file mode 100755 index 0000000..c906840 --- /dev/null +++ b/abs/mv-core/hobbit-client/client/bin/hobbitclient-irix.sh @@ -0,0 +1,58 @@ +#!/bin/sh +#----------------------------------------------------------------------------# +# Irix client for Hobbit # +# # +# Copyright (C) 2005-2006 Henrik Storner <henrik@hswn.dk> # +# # +# This program is released under the GNU General Public License (GPL), # +# version 2. See the file "COPYING" for details. # +# # +#----------------------------------------------------------------------------# +# +# $Id: hobbitclient-irix.sh,v 1.5 2006/07/05 05:52:22 henrik Rel $ + +echo "[date]" +date +echo "[uname]" +uname -a +echo "[uptime]" +uptime +echo "[who]" +who +echo "[df]" +df -Plk +echo "[mount]" +mount +echo "[swap]" +swap -ln +echo "[ifconfig]" +ifconfig -a +echo "[route]" +netstat -rn +echo "[netstat]" +netstat -s +echo "[ports]" +netstat -na -f inet -P tcp | tail +3 +netstat -na -f inet6 -P tcp | tail +5 +echo "[ifstat]" +netstat -i -n | egrep -v "^lo|<Link" +echo "[ps]" +ps -Axo pid,ppid,user,stime,state,nice,pcpu,time,sz,rss,vsz,args + +# $TOP must be set, the install utility should do that for us if it exists. +if test "$TOP" != "" +then + if test -x "$TOP" + then + echo "[top]" + $TOP -d2 -b 20 | tail +9 + fi +fi + +# vmstat and iostat do not exist on irix. SAR is your only option at this time. +nohup sh -c "sar 300 2 1>$BBTMP/hobbit_sar.$MACHINEDOTS.$$ 2>&1; mv $BBTMP/hobbit_sar.$MACHINEDOTS.$$ $BBTMP/hobbit_sar.$MACHINEDOTS" </dev/null >/dev/null 2>&1 & +sleep 5 +if test -f $BBTMP/hobbit_sar.$MACHINEDOTS; then echo "[sar]"; cat $BBTMP/hobbit_sar.$MACHINEDOTS; rm -f $BBTMP/hobbit_sar.$MACHINEDOTS; fi + +exit + diff --git a/abs/mv-core/hobbit-client/client/bin/hobbitclient-linux.sh b/abs/mv-core/hobbit-client/client/bin/hobbitclient-linux.sh new file mode 100755 index 0000000..a9ee6ae --- /dev/null +++ b/abs/mv-core/hobbit-client/client/bin/hobbitclient-linux.sh @@ -0,0 +1,83 @@ +#!/bin/sh +#----------------------------------------------------------------------------# +# Linux client for Hobbit # +# # +# Copyright (C) 2005-2006 Henrik Storner <henrik@hswn.dk> # +# # +# This program is released under the GNU General Public License (GPL), # +# version 2. See the file "COPYING" for details. # +# # +#----------------------------------------------------------------------------# +# +# $Id: hobbitclient-linux.sh,v 1.20 2006/07/09 19:25:19 henrik Rel $ + +echo "[date]" +date +echo "[uname]" +uname -rsmn +echo "[osversion]" +if [ -x /bin/lsb_release ]; then + /bin/lsb_release -r -i -s | xargs echo + /bin/lsb_release -a +elif [ -f /etc/redhat-release ]; then + cat /etc/redhat-release +elif [ -f /etc/gentoo-release ]; then + cat /etc/gentoo-release +elif [ -f /etc/debian_version ]; then + echo -en "Debian " + cat /etc/debian_version +elif [ -f /etc/SuSE-release ]; then + grep ^SuSE /etc/SuSE-release +elif [ -f /etc/slackware-version ]; then + cat /etc/slackware-version +elif [ -f /etc/mandrake-release ]; then + cat /etc/mandrake-release +elif [ -f /etc/fedora-release ]; then + cat /etc/fedora-release +elif [ -f /etc/arch-release ]; then + cat /etc/arch-release +fi +echo "[uptime]" +uptime +echo "[who]" +who +echo "[df]" +df -Pl -x none -x tmpfs -x shmfs -x unknown -x iso9660 | sed -e '/^[^ ][^ ]*$/{ +N +s/[ ]*\n[ ]*/ / +}' +echo "[mount]" +mount +echo "[free]" +free +echo "[ifconfig]" +/sbin/ifconfig +echo "[route]" +netstat -rn +echo "[netstat]" +netstat -s +echo "[ports]" +# Bug in RedHat's netstat spews annoying error messages. +netstat -ant 2>/dev/null +echo "[ifstat]" +/sbin/ifconfig +echo "[ps]" +ps -Aw -o pid,ppid,user,start,state,pri,pcpu,time,pmem,rsz,vsz,cmd + +# $TOP must be set, the install utility should do that for us if it exists. +if test "$TOP" != "" +then + if test -x "$TOP" + then + echo "[top]" + $TOP -b -n 1 + fi +fi + +# vmstat +nohup sh -c "vmstat 300 2 1>$BBTMP/hobbit_vmstat.$MACHINEDOTS.$$ 2>&1; mv $BBTMP/hobbit_vmstat.$MACHINEDOTS.$$ $BBTMP/hobbit_vmstat.$MACHINEDOTS" </dev/null >/dev/null 2>&1 & +sleep 5 +if test -f $BBTMP/hobbit_vmstat.$MACHINEDOTS; then echo "[vmstat]"; cat $BBTMP/hobbit_vmstat.$MACHINEDOTS; rm -f $BBTMP/hobbit_vmstat.$MACHINEDOTS; fi + +exit + diff --git a/abs/mv-core/hobbit-client/client/bin/hobbitclient-netbsd.sh b/abs/mv-core/hobbit-client/client/bin/hobbitclient-netbsd.sh new file mode 100755 index 0000000..49533da --- /dev/null +++ b/abs/mv-core/hobbit-client/client/bin/hobbitclient-netbsd.sh @@ -0,0 +1,62 @@ +#!/bin/sh +#----------------------------------------------------------------------------# +# NetBSD client for Hobbit # +# # +# Copyright (C) 2005-2006 Henrik Storner <henrik@hswn.dk> # +# # +# This program is released under the GNU General Public License (GPL), # +# version 2. See the file "COPYING" for details. # +# # +#----------------------------------------------------------------------------# +# +# $Id: hobbitclient-netbsd.sh,v 1.15 2006/07/05 05:52:22 henrik Rel $ + +echo "[date]" +date +echo "[uname]" +uname -a +echo "[uptime]" +uptime +echo "[who]" +who +echo "[df]" +df -P -tnonfs,kernfs,procfs,cd9660,null | sed -e '/^[^ ][^ ]*$/{ +N +s/[ ]*\n[ ]*/ / +}' +echo "[mount]" +mount +echo "[meminfo]" +$BBHOME/bin/netbsd-meminfo +echo "[swapctl]" +/sbin/swapctl -s +echo "[ifconfig]" +ifconfig -a +echo "[route]" +netstat -rn +echo "[netstat]" +netstat -s +echo "[ifstat]" +netstat -i -b -n | egrep -v "^lo|<Link" +echo "[ports]" +(netstat -na -f inet; netstat -na -f inet6) | grep "^tcp" +echo "[ps]" +ps -ax -ww -o pid,ppid,user,start,state,pri,pcpu,cputime,pmem,rss,vsz,args + +# $TOP must be set, the install utility should do that for us if it exists. +if test "$TOP" != "" +then + if test -x "$TOP" + then + echo "[top]" + $TOP -n 20 + fi +fi + +# vmstat +nohup sh -c "vmstat 300 2 1>$BBTMP/hobbit_vmstat.$MACHINEDOTS.$$ 2>&1; mv $BBTMP/hobbit_vmstat.$MACHINEDOTS.$$ $BBTMP/hobbit_vmstat.$MACHINEDOTS" </dev/null >/dev/null 2>&1 & +sleep 5 +if test -f $BBTMP/hobbit_vmstat.$MACHINEDOTS; then echo "[vmstat]"; cat $BBTMP/hobbit_vmstat.$MACHINEDOTS; rm -f $BBTMP/hobbit_vmstat.$MACHINEDOTS; fi + +exit + diff --git a/abs/mv-core/hobbit-client/client/bin/hobbitclient-openbsd.sh b/abs/mv-core/hobbit-client/client/bin/hobbitclient-openbsd.sh new file mode 100755 index 0000000..88a98f1 --- /dev/null +++ b/abs/mv-core/hobbit-client/client/bin/hobbitclient-openbsd.sh @@ -0,0 +1,62 @@ +#!/bin/sh +#----------------------------------------------------------------------------# +# OpenBSD client for Hobbit # +# # +# Copyright (C) 2005-2006 Henrik Storner <henrik@hswn.dk> # +# # +# This program is released under the GNU General Public License (GPL), # +# version 2. See the file "COPYING" for details. # +# # +#----------------------------------------------------------------------------# +# +# $Id: hobbitclient-openbsd.sh,v 1.14 2006/07/05 05:52:22 henrik Rel $ + +echo "[date]" +date +echo "[uname]" +uname -a +echo "[uptime]" +uptime +echo "[who]" +who +echo "[df]" +df -P -tnonfs,kernfs,procfs,cd9660 | sed -e '/^[^ ][^ ]*$/{ +N +s/[ ]*\n[ ]*/ / +}' +echo "[mount]" +mount +echo "[meminfo]" +$BBHOME/bin/openbsd-meminfo +echo "[swapctl]" +/sbin/swapctl -s +echo "[ifconfig]" +ifconfig -A +echo "[route]" +netstat -rn +echo "[netstat]" +netstat -s +echo "[ifstat]" +netstat -i -b -n | egrep -v "^lo|<Link" +echo "[ports]" +(netstat -na -f inet; netstat -na -f inet6) | grep "^tcp" +echo "[ps]" +ps -ax -ww -o pid,ppid,user,start,state,pri,pcpu,cputime,pmem,rss,vsz,args + +# $TOP must be set, the install utility should do that for us if it exists. +if test "$TOP" != "" +then + if test -x "$TOP" + then + echo "[top]" + $TOP -n 20 + fi +fi + +# vmstat +nohup sh -c "vmstat 300 2 1>$BBTMP/hobbit_vmstat.$MACHINEDOTS.$$ 2>&1; mv $BBTMP/hobbit_vmstat.$MACHINEDOTS.$$ $BBTMP/hobbit_vmstat.$MACHINEDOTS" </dev/null >/dev/null 2>&1 & +sleep 5 +if test -f $BBTMP/hobbit_vmstat.$MACHINEDOTS; then echo "[vmstat]"; cat $BBTMP/hobbit_vmstat.$MACHINEDOTS; rm -f $BBTMP/hobbit_vmstat.$MACHINEDOTS; fi + +exit + diff --git a/abs/mv-core/hobbit-client/client/bin/hobbitclient-osf1.sh b/abs/mv-core/hobbit-client/client/bin/hobbitclient-osf1.sh new file mode 100755 index 0000000..6750152 --- /dev/null +++ b/abs/mv-core/hobbit-client/client/bin/hobbitclient-osf1.sh @@ -0,0 +1,60 @@ +#!/bin/sh +#----------------------------------------------------------------------------# +# OSF1 client for Hobbit # +# # +# Copyright (C) 2005-2006 Henrik Storner <henrik@hswn.dk> # +# # +# This program is released under the GNU General Public License (GPL), # +# version 2. See the file "COPYING" for details. # +# # +#----------------------------------------------------------------------------# +# +# $Id: hobbitclient-osf1.sh,v 1.13 2006/07/05 05:52:22 henrik Rel $ + +echo "[date]" +date +echo "[uname]" +uname -a +echo "[uptime]" +uptime +echo "[who]" +who +echo "[memory]" +vmstat -P +echo "[swap]" +swapon -s +echo "[df]" +df -t noprocfs | sed -e '/^[^ ][^ ]*$/{ +N +s/[ ]*\n[ ]*/ / +}' +echo "[mount]" +mount +echo "[ifconfig]" +ifconfig -a +echo "[route]" +cat /etc/routes +echo "[netstat]" +netstat -s +echo "[ports]" +netstat -an|grep "^tcp" +echo "[ps]" +ps -ef + +# $TOP must be set, the install utility should do that for us if it exists. +if test "$TOP" != "" +then + if test -x "$TOP" + then + echo "[top]" + $TOP -b -n 1 + fi +fi + +# vmstat +nohup sh -c "vmstat 300 2 1>$BBTMP/hobbit_vmstat.$MACHINEDOTS.$$ 2>&1; mv $BBTMP/hobbit_vmstat.$MACHINEDOTS.$$ $BBTMP/hobbit_vmstat.$MACHINEDOTS" </dev/null >/dev/null 2>&1 & +sleep 5 +if test -f $BBTMP/hobbit_vmstat.$MACHINEDOTS; then echo "[vmstat]"; cat $BBTMP/hobbit_vmstat.$MACHINEDOTS; rm -f $BBTMP/hobbit_vmstat.$MACHINEDOTS; fi + +exit + diff --git a/abs/mv-core/hobbit-client/client/bin/hobbitclient-sco_sv.sh b/abs/mv-core/hobbit-client/client/bin/hobbitclient-sco_sv.sh new file mode 100755 index 0000000..512598c --- /dev/null +++ b/abs/mv-core/hobbit-client/client/bin/hobbitclient-sco_sv.sh @@ -0,0 +1,60 @@ +#!/bin/sh +#----------------------------------------------------------------------------# +# SCO_SV client for Hobbit # +# # +# Copyright (C) 2005-2006 Henrik Storner <henrik@hswn.dk> # +# Copyright (C) 2006 Charles Goyard <cg@fsck.fr> # +# # +# This program is released under the GNU General Public License (GPL), # +# version 2. See the file "COPYING" for details. # +# # +#----------------------------------------------------------------------------# +# +# $Id: hobbitclient-sco_sv.sh,v 1.2 2006/08/02 13:35:46 henrik Rel $ + +echo "[date]" +date +echo "[uname]" +uname -a +echo "[uptime]" +uptime +echo "[who]" +who -x +echo "[df]" +df -Bk +echo "[mount]" +mount -v +echo "[memsize]" +/etc/memsize +echo "[freemem]" +sar -r 1 2 | tail -1 +echo "[swap]" +swap -l +echo "[ifconfig]" +ifconfig -a +echo "[ifstat]" +ifconfig -in +echo "[route]" +netstat -rn +echo "[netstat]" +netstat -s +echo "[ports]" +netstat -an | grep "^tcp" +echo "[ps]" +ps -A -o pid,ppid,user,stime,s,pri,pcpu,time,vsz,args +# $TOP must be set, the install utility should do that for us if it exists. +if test "$TOP" != "" +then + if test -x "$TOP" + then + echo "[top]" + $TOP -b -n 1 + fi +fi +# vmstat +nohup sh -c "vmstat 300 2 1>$BBTMP/hobbit_vmstat.$MACHINEDOTS.$$ 2>&1; mv $BBTMP/hobbit_vmstat.$MACHINEDOTS.$$ $BBTMP/hobbit_vmstat.$MACHINEDOTS" </dev/null >/dev/null 2>&1 & +sleep 5 +if test -f $BBTMP/hobbit_vmstat.$MACHINEDOTS; then echo "[vmstat]"; cat $BBTMP/hobbit_vmstat.$MACHINEDOTS; rm -f $BBTMP/hobbit_vmstat.$MACHINEDOTS; fi + +exit + diff --git a/abs/mv-core/hobbit-client/client/bin/hobbitclient-sunos.sh b/abs/mv-core/hobbit-client/client/bin/hobbitclient-sunos.sh new file mode 100755 index 0000000..d0ae1b9 --- /dev/null +++ b/abs/mv-core/hobbit-client/client/bin/hobbitclient-sunos.sh @@ -0,0 +1,77 @@ +#!/bin/sh +#----------------------------------------------------------------------------# +# Solaris client for Hobbit # +# # +# Copyright (C) 2005-2006 Henrik Storner <henrik@hswn.dk> # +# # +# This program is released under the GNU General Public License (GPL), # +# version 2. See the file "COPYING" for details. # +# # +#----------------------------------------------------------------------------# +# +# $Id: hobbitclient-sunos.sh,v 1.18 2006/07/05 05:52:22 henrik Rel $ + +echo "[date]" +date +echo "[uname]" +uname -a +echo "[uptime]" +uptime +echo "[who]" +who + +echo "[df]" +# All of this because Solaris df cannot show multiple fs-types, or exclude certain fs types. +FSTYPES=`/bin/df -n -l|awk '{print $3}'|egrep -v "^proc|^fd|^mntfs|^ctfs|^devfs|^objfs|^nfs"|sort|uniq` +if test "$FSTYPES" = ""; then FSTYPES="ufs"; fi +set $FSTYPES +/bin/df -F $1 -k | grep -v " /var/run" +shift +while test "$1" != ""; do + /bin/df -F $1 -k | grep -v " /var/run" | tail +2 + shift +done + +echo "[mount]" +mount +echo "[prtconf]" +/usr/sbin/prtconf +echo "[memory]" +vmstat 1 2 | tail -1 +echo "[swap]" +/usr/sbin/swap -s +echo "[ifconfig]" +ifconfig -a +echo "[route]" +netstat -rn +echo "[netstat]" +netstat -s +echo "[ports]" +netstat -na -f inet -P tcp | tail +3 +netstat -na -f inet6 -P tcp | tail +5 +echo "[ifstat]" +/usr/bin/kstat -p -s '[or]bytes64' | sort +echo "[ps]" +ps -A -o pid,ppid,user,stime,s,pri,pcpu,time,pmem,rss,vsz,args + +# $TOP must be set, the install utility should do that for us if it exists. +if test "$TOP" != "" +then + if test -x "$TOP" + then + echo "[top]" + $TOP -b 20 + fi +fi + +# vmstat and iostat (iostat -d provides a cpu utilisation with I/O wait number) +nohup sh -c "vmstat 300 2 1>$BBTMP/hobbit_vmstat.$MACHINEDOTS.$$ 2>&1; mv $BBTMP/hobbit_vmstat.$MACHINEDOTS.$$ $BBTMP/hobbit_vmstat.$MACHINEDOTS" </dev/null >/dev/null 2>&1 & +nohup sh -c "iostat -c 300 2 1>$BBTMP/hobbit_iostatcpu.$MACHINEDOTS.$$ 2>&1; mv $BBTMP/hobbit_iostatcpu.$MACHINEDOTS.$$ $BBTMP/hobbit_iostatcpu.$MACHINEDOTS" </dev/null >/dev/null 2>&1 & +nohup sh -c "iostat -dxsrP 300 2 1>$BBTMP/hobbit_iostatdisk.$MACHINEDOTS.$$ 2>&1; mv $BBTMP/hobbit_iostatdisk.$MACHINEDOTS.$$ $BBTMP/hobbit_iostatdisk.$MACHINEDOTS" </dev/null >/dev/null 2>&1 & +sleep 5 +if test -f $BBTMP/hobbit_vmstat.$MACHINEDOTS; then echo "[vmstat]"; cat $BBTMP/hobbit_vmstat.$MACHINEDOTS; rm -f $BBTMP/hobbit_vmstat.$MACHINEDOTS; fi +if test -f $BBTMP/hobbit_iostatcpu.$MACHINEDOTS; then echo "[iostatcpu]"; cat $BBTMP/hobbit_iostatcpu.$MACHINEDOTS; rm -f $BBTMP/hobbit_iostatcpu.$MACHINEDOTS; fi +if test -f $BBTMP/hobbit_iostatdisk.$MACHINEDOTS; then echo "[iostatdisk]"; cat $BBTMP/hobbit_iostatdisk.$MACHINEDOTS; rm -f $BBTMP/hobbit_iostatdisk.$MACHINEDOTS; fi + +exit + diff --git a/abs/mv-core/hobbit-client/client/bin/hobbitclient.sh b/abs/mv-core/hobbit-client/client/bin/hobbitclient.sh new file mode 100755 index 0000000..8d66734 --- /dev/null +++ b/abs/mv-core/hobbit-client/client/bin/hobbitclient.sh @@ -0,0 +1,94 @@ +#!/bin/sh +#----------------------------------------------------------------------------# +# Hobbit client main script. # +# # +# This invokes the OS-specific script to build a client message, and sends # +# if off to the Hobbit server. # +# # +# Copyright (C) 2005-2006 Henrik Storner <henrik@hswn.dk> # +# # +# This program is released under the GNU General Public License (GPL), # +# version 2. See the file "COPYING" for details. # +# # +#----------------------------------------------------------------------------# +# +# $Id: hobbitclient.sh,v 1.17 2006/07/06 09:07:53 henrik Rel $ + +# Must make sure the commands return standard (english) texts. +LANG=C +LC_ALL=C +LC_MESSAGES=C +export LANG LC_ALL LC_MESSAGES + +LOCALMODE="no" +if test $# -ge 1; then + if test "$1" = "--local"; then + LOCALMODE="yes" + fi + shift +fi + +if test "$BBOSSCRIPT" = ""; then + BBOSSCRIPT="hobbitclient-`uname -s | tr '[A-Z]' '[a-z]'`.sh" +fi + +MSGFILE="$BBTMP/msg.$MACHINEDOTS.txt" +MSGTMPFILE="$MSGFILE.$$" +LOGFETCHCFG=$BBTMP/logfetch.$MACHINEDOTS.cfg +LOGFETCHSTATUS=$BBTMP/logfetch.$MACHINEDOTS.status +export LOGFETCHCFG LOGFETCHSTATUS + +rm -f $MSGTMPFILE +touch $MSGTMPFILE + + +CLIENTVERSION="`$BBHOME/bin/clientupdate --level`" + +if test "$LOCALMODE" = "yes"; then + echo "@@client#1|0|127.0.0.1|$MACHINEDOTS|$BBOSTYPE" >> $MSGTMPFILE +fi + +echo "client $MACHINE.$BBOSTYPE $CONFIGCLASS" >> $MSGTMPFILE +$BBHOME/bin/$BBOSSCRIPT >> $MSGTMPFILE +# logfiles +if test -f $LOGFETCHCFG +then + $BBHOME/bin/logfetch $LOGFETCHCFG $LOGFETCHSTATUS >>$MSGTMPFILE +fi +# Client version +echo "[clientversion]" >>$MSGTMPFILE +echo "$CLIENTVERSION" >> $MSGTMPFILE +# System clock +echo "[clock]" >> $MSGTMPFILE +$BBHOME/bin/logfetch --clock >> $MSGTMPFILE + +if test "$LOCALMODE" = "yes"; then + echo "@@" >> $MSGTMPFILE + $BBHOME/bin/hobbitd_client --local --config=$BBHOME/etc/localclient.cfg <$MSGTMPFILE +else + $BB $BBDISP "@" < $MSGTMPFILE >$LOGFETCHCFG.tmp + if test -f $LOGFETCHCFG.tmp + then + if test -s $LOGFETCHCFG.tmp + then + mv $LOGFETCHCFG.tmp $LOGFETCHCFG + else + rm -f $LOGFETCHCFG.tmp + fi + fi +fi + +# Save the latest file for debugging. +rm -f $MSGFILE +mv $MSGTMPFILE $MSGFILE + +if test "$LOCALMODE" != "yes" -a -f $LOGFETCHCFG; then + # Check for client updates + SERVERVERSION=`grep "^clientversion:" $LOGFETCHCFG | cut -d: -f2` + if test "$SERVERVERSION" != "" -a "$SERVERVERSION" != "$CLIENTVERSION"; then + exec $BBHOME/bin/clientupdate --update=$SERVERVERSION --reexec + fi +fi + +exit 0 + diff --git a/abs/mv-core/hobbit-client/client/bin/hobbitlaunch b/abs/mv-core/hobbit-client/client/bin/hobbitlaunch Binary files differnew file mode 100755 index 0000000..9104dda --- /dev/null +++ b/abs/mv-core/hobbit-client/client/bin/hobbitlaunch diff --git a/abs/mv-core/hobbit-client/client/bin/logfetch b/abs/mv-core/hobbit-client/client/bin/logfetch Binary files differnew file mode 100755 index 0000000..0b71938 --- /dev/null +++ b/abs/mv-core/hobbit-client/client/bin/logfetch diff --git a/abs/mv-core/hobbit-client/client/bin/msgcache b/abs/mv-core/hobbit-client/client/bin/msgcache Binary files differnew file mode 100755 index 0000000..33daa51 --- /dev/null +++ b/abs/mv-core/hobbit-client/client/bin/msgcache diff --git a/abs/mv-core/hobbit-client/client/bin/orcahobbit b/abs/mv-core/hobbit-client/client/bin/orcahobbit Binary files differnew file mode 100755 index 0000000..9fcb227 --- /dev/null +++ b/abs/mv-core/hobbit-client/client/bin/orcahobbit |