Re: automatic system info tool?

Поиск
Список
Период
Сортировка
От Bort, Paul
Тема Re: automatic system info tool?
Дата
Msg-id DB106B1B5B8F734B8FF3E155A3A556C202D4FD0E@clemail1.tmwsystems.com
обсуждение исходный текст
Ответ на Re: automatic system info tool?  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: automatic system info tool?  ("Andrej Ricnik-Bay" <andrej.groups@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: Proposed patch for contrib/cube
Следующее
От: Martin Pitt
Дата:
Сообщение: pg_dump: add option to ignore TABLE DATA for failed TABLE object creation