I just had a look at this mail, and the scripts came out looking very ugly. Here they are again in text format.
--- hobbitclient-cygwin.sh ---
#!/bin/sh #----------------------------------------------------------------------- -----#
Cygwin client for Hobbit
Copyright (C) 2005 Henrik Storner <henrik at 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.5 2005/08/01 05:58:29 henrik Exp $
echo "[date]" date echo "[uname]" uname -a echo "[uptime]" uptime echo "[who]" w
echo "[df]" df -k
echo "[prtconf]"
echo "[memory]" vmstat 1 2 | tail -1 echo "[swap]"
echo "[netstat]" netstat -s echo "[ps]" ps -ef echo "[top]" top -b -n1
vmstat
nohup $HOBBITCLIENTHOME/bin/getvmstat.sh & sleep 5 if test -f $BBTMP/hobbit_vmstat; then echo "[vmstat]"; cat $BBTMP/hobbit_vmstat; rm -f $BBTMP/hobbit_vmstat; fi
exit --- end ---
--- getvmstat.sh ---
vmstat 300 2 1>$BBTMP/hobbit_vmstat.$$ 2>&1 mv $BBTMP/hobbit_vmstat.$$ $BBTMP/hobbit_vmstat </dev/null >/dev/null 2>&1
--- end ---
Regards Vernon
No trees were killed in the creation of this message. However, many electrons were terribly inconvenienced.
-----Original Message----- From: Vernon Everett [mailto:v.everett at afgonline.com.au] Sent: Monday, 28 November 2005 3:02 PM To: hobbit at hswn.dk Subject: RE: [hobbit] Windows logs.
Hi Henrik
Hobbit client runs on Windoze. (Disclaimer applies - see below) :-)
After a little bit of playing around, I managed to compile the client in Windows, and it works.
I did cheat a little. Sort of. I had Cygwin installed. For those not familiar with Cygwin, it brings the joys of Unix to Windows, including shell scripts, cron, sed, awk, ls, vi and all those other commands we know and love so much. It's published under GNU GPL. :-) You can download or install it from here. http://www.cygwin.com/ To quote their FAQ ---snip--- What is it?
The Cygwin tools are ports of the popular GNU development tools for Microsoft Windows. They run thanks to the Cygwin library which provides the UNIX system calls and environment these programs expect.
With these tools installed, it is possible to write Win32 console or GUI applications that make use of the standard Microsoft Win32 API and/or the Cygwin API. As a result, it is possible to easily port many significant Unix programs without the need for extensive changes to the source code. This includes configuring and building most of the available GNU software (including the packages included with the Cygwin development tools themselves). Even if the development tools are of little to no use to you, you may have interest in the many standard Unix utilities provided with the package. They can be used both from the bash shell (provided) or from the standard Windows command shell. ---snip---
To install Hobbit client, I simply extracted the .tar, ran configure.client, make, make install. There are a few caveats.
- It needs a valid user. (Once Cygwin's installed check /etc/passwd for a list) 2. It doesn't like spaces in the install path folder names 3. Most of the development components of Cygwin need to be installed first. (These are not installed by default)
It's far from perfect but I think it's a good starting point, and there will hopefully be no need for multiple code versions for different platforms. I hit a few problems. First, it doesn't know what OS it's running. I hacked the runclient.sh and set os to sunos to try and bring some sanity to the world, but it still had no clue. After looking at how runclient works, I realised I could rewrite hobbitclient-sunos.sh for Cygwin.
I had to add a line to runclient.sh, just after the BBOSTYPE= I added echo $BBOSTYPE | grep cygwin && BBOSTYPE=cygwin This cuts all the other garbage from the uname -s output which might be different, depending on what version of Windoze you use.
I then created a hobbitclient-cygwin.sh with a few commands changed to provide output as close to that provided by the equivalent sunos commands. (attached) Also, because of limitations in the Cygwin shell, I also had to abstract the vmstat test to an external script, which I put in $BBCLIENTHOME/bin/ for convenience. (Also attached)
Right now it's doing its thing, and sending data back to the server (I think) but the server is not displaying any results other than conn. How can I check what's being received by the server, and what's being done with it?
Regards Vernon
No trees were killed in the creation of this message. However, many electrons were terribly inconvenienced.
-----Original Message----- From: Henrik Stoerner [mailto:henrik at hswn.dk] Sent: Thursday, 24 November 2005 2:40 PM To: hobbit at hswn.dk Subject: Re: [hobbit] Windows logs.
On Wed, Nov 23, 2005 at 02:19:04PM -0800, Charles Jones -X (charljon - Cisco Learning Institute at Cisco) wrote:
Sounds like we need someone who is good at VC++ to create a nice hobbit windows client. I would volunteer but I am lacking the knowledge,
I have a volunteer who is looking at doing a Hobbit client for Windows.
Regards, Henrik
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
_ _
NOTICE: This message and any attachments are confidential and may contain copyright material of Australian Finance Group Limited or a third party. It is intended solely for the purpose of the addressee and any other named recipient. If you are not the intended recipient, any use, distribution, disclosure or copying of this message is strictly prohibited. The confidentiality attached to this message is not waived or lost by reason of the mistaken transmission or delivery to any unintended party. If you have received this message in error, please notify the author immediately or contact Australian Finance Group on +61 8 9420 7888.
NOTICE: This message and any attachments are confidential and may contain copyright material of Australian Finance Group Limited or a third party. It is intended solely for the purpose of the addressee and any other named recipient. If you are not the intended recipient, any use, distribution, disclosure or copying of this message is strictly prohibited. The confidentiality attached to this message is not waived or lost by reason of the mistaken transmission or delivery to any unintended party. If you have received this message in error, please notify the author immediately or contact Australian Finance Group on +61 8 9420 7888.
participants (1)
-
v.everettï¼ afgonline.com.au