Re: automatic system info tool? - Mailing list pgsql-hackers

From Zeugswetter Andreas DCP SD
Subject Re: automatic system info tool?
Date
Msg-id E1539E0ED7043848906A8FF995BDA579012B4330@m0143.s-mxs.net
Whole thread Raw
In response to Re: automatic system info tool?  (Steve Atkins <steve@blighty.com>)
List pgsql-hackers
> >> If you can open a command shell you can get the OS version with the

> >> 'ver' command under Windows:
> >>
> >> C:\>ver
> >>
> >> Microsoft Windows XP [Version 5.1.2600]
> >
> > How do you do this from a program though. Under UNIX uname() is a
> > function call as well as a program. It returns the os name, version,

> > hostname and system type.
> >
>
> GetVersionEx() will get you the windows version, service
> pack, etc IIRC.

in perl:

use POSIX;
print join(',',POSIX::uname()),"\n";

prints:
Windows NT,hostname.domain.com,5.0,Build 2195 (Service Pack 4),x86

Works on all Platforms.

(more detail on Win with: use Win32; join(' ', Win32::GetOSVersion()),
"\n";)

Andreas


pgsql-hackers by date:

Previous
From: Tzahi Fadida
Date:
Subject: missing tuplestore_gettuple
Next
From: Katsuhiko Okano
Date:
Subject: CSStorm occurred again by postgreSQL8.2. (Re: poor performance with Context Switch Storm at TPC-W.)