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

From Bort, Paul
Subject Re: automatic system info tool?
Date
Msg-id DB106B1B5B8F734B8FF3E155A3A556C202D4FD0E@clemail1.tmwsystems.com
Whole thread Raw
In response to Re: automatic system info tool?  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: automatic system info tool?  ("Andrej Ricnik-Bay" <andrej.groups@gmail.com>)
List 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@svana.org>
> http://svana.org/kleptog/
> > From each according to his ability. To each according to
> his ability to litigate.
>


pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Proposed patch for contrib/cube
Next
From: Martin Pitt
Date:
Subject: pg_dump: add option to ignore TABLE DATA for failed TABLE object creation