On 3/10/06, Tony van der Hoff <[EMAIL PROTECTED]> wrote:
>
> I would write a script to parse my hosts file for ltsp workstations, ping
> each of them in turn, and use the result (or lack of it) in whatever way is
> appropriate.

Maybe this will help

I wrote this tiny C program to automate testing my thin client
k12ltsp network. All you need to do is compile it and then run it as root.
Root is required for ping to work in flood mode.

1) save the code below as a file. Say nettest.c
*make sure the last line is blank
2) $gcc nettest.c -o nettest
3) #./nettest
or you can save your output to a file like this
#./netstat > outputfile

//===============================
// A little utility to check thin client LTSP network
// Author: Robert Arkiletian

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main() {

       FILE* fp=popen("netstat -t -e|grep x11|sed -e 's/:/ /g'|\
awk '{print $6}'|grep -v root|sort|uniq","r");
       char ip[64];

       while ( fgets(ip,sizeof(ip)-1,fp) )
       {
               char ping[64]="ping -c100 -f -p aa ";
               system( strcat(ping,ip) );
       }

       pclose(fp);
       return 0;
}
//===============================


You can also try using my Fl_TeacherTool to see who is on
http://www3.telus.net/public/robark/Fl_TeacherTool/

--
Robert Arkiletian
C++ GUI tutorial http://fltk.org/links.php?V19


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_____________________________________________________________________
Ltsp-discuss mailing list.   To un-subscribe, or change prefs, goto:
      https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help,   try #ltsp channel on irc.freenode.net

Reply via email to