| From: | "Bort, Paul" <pbort(at)tmwsystems(dot)com> |
|---|---|
| To: | <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: automatic system info tool? |
| Date: | 2006-07-17 21:10:45 |
| Message-ID: | DB106B1B5B8F734B8FF3E155A3A556C202D4FD0E@clemail1.tmwsystems.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
>
> 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.
>
Multiple methods (TIMTOWTDI) depending on what you want:
my $verstring = `cmd.exe /c ver`;
# or
use Win32;
my ($string, $major, $minor, $build, $id ) = Win32::GetOSVersion;
The environment variables PROCESSOR_ARCHITECTURE and
PROCESSOR_IDENTIFIER should provide the basic hardware information.
> Mind you, maybe perl provides emulation for uname?
Not that I know of.
>
> Have a nice day,
> --
> Martijn van Oosterhout <kleptog(at)svana(dot)org>
> http://svana.org/kleptog/
> > From each according to his ability. To each according to
> his ability to litigate.
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Matteo Bertini | 2006-07-17 21:22:52 | Re: plpython sets |
| Previous Message | Josh Berkus | 2006-07-17 20:59:51 | Re: Proposed patch for contrib/cube |