Re: what is the best way to determine system OS?

2005-05-15 Thread googleboy
I did somethign that really seems far brighter... approaching it from a slightly different angle I just search through each line for the right field title, and then take that field's value from teh last line of output. Doesn't matter what OS, doesn't matter what format now. It can cope with it

Re: what is the best way to determine system OS?

2005-04-26 Thread Roel Schroeven
googleboy wrote: What this script does is use take the output of vmstat to report idle cpu cycles (or memory stuff, etc.) over a period specified by a parameter, all the better to be a plugin for a monitoring service. Basically it parses the output of the command, runs through a whole bunch of

Re: what is the best way to determine system OS?

2005-04-26 Thread Mike Meyer
Roel Schroeven [EMAIL PROTECTED] writes: googleboy wrote: What this script does is use take the output of vmstat to report idle cpu cycles (or memory stuff, etc.) over a period specified by a parameter, all the better to be a plugin for a monitoring service. Basically it parses the output

Re: what is the best way to determine system OS?

2005-04-26 Thread Roel Schroeven
Mike Meyer wrote: In that case, it seems to be a better idea to check the version of vmstat that's on the system. At least, I presume that such differences in behaviour can be deduced from the vmstat version string. Hmm. That doesn't seem to work here: guru% vmstat --version vmstat: illegal

Re: what is the best way to determine system OS?

2005-04-26 Thread Mike Meyer
Roel Schroeven [EMAIL PROTECTED] writes: Mike Meyer wrote: In that case, it seems to be a better idea to check the version of vmstat that's on the system. At least, I presume that such differences in behaviour can be deduced from the vmstat version string. Hmm. That doesn't seem to work here:

what is the best way to determine system OS?

2005-04-25 Thread googleboy
Hi there. I am writing a little app tha tI would like to make cross-platform (debian, RH, Fedora, Solaris, AIX, etc) Originally I decided to check what uname returned, as I didn't think it mattered beyond the detail of Linux or SunOS etc. Recently I have learned that FC3 breaks my script, so I

Re: what is the best way to determine system OS?

2005-04-25 Thread Philippe C. Martin
How about popen of 'uname -r' ? Regards, Philippe googleboy wrote: Hi there. I am writing a little app tha tI would like to make cross-platform (debian, RH, Fedora, Solaris, AIX, etc) Originally I decided to check what uname returned, as I didn't think it mattered beyond the detail

Re: what is the best way to determine system OS?

2005-04-25 Thread Mike Meyer
googleboy [EMAIL PROTECTED] writes: Hi there. I am writing a little app tha tI would like to make cross-platform (debian, RH, Fedora, Solaris, AIX, etc) Originally I decided to check what uname returned, as I didn't think it mattered beyond the detail of Linux or SunOS etc. Recently I

Re: what is the best way to determine system OS?

2005-04-25 Thread Sion Arrowsmith
Philippe C. Martin [EMAIL PROTECTED] wrote: How about popen of 'uname -r' ? os.uname()[2] is probably a better way (ie it doesn't spawning another process) of getting this information. I don't think it will help the original poster though (depending on *what* it is about FC3 which is breaking

Re: what is the best way to determine system OS?

2005-04-25 Thread Philippe C. Martin
Well, At least I discovered os.uname :-) Thanks, Philippe Sion Arrowsmith wrote: Philippe C. Martin [EMAIL PROTECTED] wrote: How about popen of 'uname -r' ? os.uname()[2] is probably a better way (ie it doesn't spawning another process) of getting this information. I don't think it

Re: what is the best way to determine system OS?

2005-04-25 Thread Mike Meyer
[EMAIL PROTECTED] (Cameron Laird) writes: In article [EMAIL PROTECTED], Mike Meyer [EMAIL PROTECTED] wrote: What you should do instead is check on how to use the features you want. If you watch a typical autoconf script, you'll see it groveling through libraries, include files, and various

Re: what is the best way to determine system OS?

2005-04-25 Thread googleboy
Thanks for the edifying responses. I will try out these things and figure out if I have enough to solve my problem. What this script does is use take the output of vmstat to report idle cpu cycles (or memory stuff, etc.) over a period specified by a parameter, all the better to be a plugin for