what is the best way to determine system OS?

Mike Meyer mwm at mired.org
Tue Apr 26 22:55:13 EDT 2005


Roel Schroeven <rschroev_nospam_ml at fastmail.fm> 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:
>> guru% vmstat --version
>> vmstat: illegal option -- -
>> usage: vmstat [-aimsz] [-c count] [-M core [-N system]] [-w wait]
>>               [-n devs] [disks]
>
> The version on Debian Woody uses -V:
>
> $ vmstat -V
> procps version 2.0.7
>
> Apparently it is quite a different program than yours; the -V option
> is cleary labeled in the man page, and it supports much less options:

-V doesn't work here:
guru% vmstat -V
vmstat: illegal option -- V
usage: vmstat [-aimsz] [-c count] [-M core [-N system]] [-w wait]
              [-n devs] [disks]

Of course, you could use the fact that various things *don't* work
as a hint to what version of vmstat you have. I'd be interested in
what other BSD's did - especially with "what $(which vmstat)".

     <mike
-- 
Mike Meyer <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.



More information about the Python-list mailing list