Re: [HACKERS] automatic system info tool?
Andrej Ricnik-Bay wrote: On 7/18/06, Bort, Paul <[EMAIL PROTECTED]> wrote: > Mind you, maybe perl provides emulation for uname? Not that I know of. Wouldn't $^0 and $Config{archname} cover quite a few, though? No. As previously explained, these values reflect what was true when and where perl was compiled. In general, I need what is true at the time buildfarm is run. Anyway, I think we have some good possibilities. cheers andrew ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
Re: [HACKERS] automatic system info tool?
> >> 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 ---(end of broadcast)--- TIP 6: explain analyze is your friend
Re: [HACKERS] automatic system info tool?
On 7/18/06, Bort, Paul <[EMAIL PROTECTED]> wrote: > Mind you, maybe perl provides emulation for uname? Not that I know of. Wouldn't $^0 and $Config{archname} cover quite a few, though? ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
Re: [HACKERS] automatic system info tool?
> > 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 > http://svana.org/kleptog/ > > From each according to his ability. To each according to > his ability to litigate. > ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
Re: [HACKERS] automatic system info tool?
On Jul 17, 2006, at 12:57 PM, Martijn van Oosterhout wrote: On Mon, Jul 17, 2006 at 11:06:50AM -0400, Bort, Paul wrote: 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. Cheers, Steve ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [HACKERS] automatic system info tool?
On Mon, Jul 17, 2006 at 11:06:50AM -0400, Bort, Paul wrote: > 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. Mind you, maybe perl provides emulation for uname? Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature
Re: [HACKERS] automatic system info tool?
> > On UNIX systems uname may work pretty well. But I guess each > system may > have slightly different options. What'll probably happen is that you > end up with a big if() statement testing $Config{osname} wtih > each case > having specific code to determine the specifics. But for that you need > information. How do you get the currently running release of windows > for example? > 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] C:\> This should work on 2000 or later. (Windows 2000 is 5.0.something.) Regards, Paul ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [HACKERS] automatic system info tool?
On Mon, Jul 17, 2006 at 09:06:34AM -0400, Andrew Dunstan wrote: > > I'm fairly familiar with it :-) > > The trouble is that it gives info set at the time perl was compiled, > which doesn't help with the problem where a machine has been upgraded. > For example, on this FC3 machine it reports a different kernel version > from the one I have upgraded to, not surprisingly. Hmm. The osname and archname might still be useful, but the rest could be out of date. > So what I need if possible is a runtime tool to detect the info we need. On UNIX systems uname may work pretty well. But I guess each system may have slightly different options. What'll probably happen is that you end up with a big if() statement testing $Config{osname} wtih each case having specific code to determine the specifics. But for that you need information. How do you get the currently running release of windows for example? Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature
Re: [HACKERS] automatic system info tool?
I'm fairly familiar with it :-) The trouble is that it gives info set at the time perl was compiled, which doesn't help with the problem where a machine has been upgraded. For example, on this FC3 machine it reports a different kernel version from the one I have upgraded to, not surprisingly. So what I need if possible is a runtime tool to detect the info we need. cheers andrew Martijn van Oosterhout wrote: On Sun, Jul 16, 2006 at 06:49:26PM -0400, Andrew Dunstan wrote: We also classify buildfarm machines by compiler_version> and config.guess doesn't give us that, unfortunately. It would seem to be a lot easier to use the values from perl itself, given you're already using it: # perl -MConfig -e 'print "os=$Config{osname}, osvers=$Config{osvers}, archname=$Config{archname}\n"' os=linux, osvers=2.6.15.4, archname=i486-linux-gnu-thread-multi If you look at perl -V it give you a subset of useful values, probably a lot nicer than munging config.guess. It'll even tell you the size of of the C datatypes if you're interested :) Have a nice day, ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
Re: [HACKERS] automatic system info tool?
On Sun, Jul 16, 2006 at 06:49:26PM -0400, Andrew Dunstan wrote: > We also classify buildfarm machines by compiler_version> and config.guess doesn't give us that, unfortunately. It would seem to be a lot easier to use the values from perl itself, given you're already using it: # perl -MConfig -e 'print "os=$Config{osname}, osvers=$Config{osvers}, archname=$Config{archname}\n"' os=linux, osvers=2.6.15.4, archname=i486-linux-gnu-thread-multi If you look at perl -V it give you a subset of useful values, probably a lot nicer than munging config.guess. It'll even tell you the size of of the C datatypes if you're interested :) Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature
Re: [HACKERS] automatic system info tool?
-Original Message- From: "Andrew Dunstan" <[EMAIL PROTECTED]> To: "Peter Eisentraut" <[EMAIL PROTECTED]> Cc: "pgsql-hackers@postgresql.org" Sent: 16/07/06 23:50 Subject: Re: [HACKERS] automatic system info tool? > We also classify buildfarm machines by compiler_version> and config.guess doesn't give us that, unfortunately. It also won't work on Win32 without msys (or SFU/Interix). /D ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
Re: [HACKERS] automatic system info tool?
Peter Eisentraut wrote: Andrew Dunstan wrote: Someone at the conference mentioned a tool that would portably and reliably report system info such as architecture. What's wrong with config.guess? That will probably be OK for architecture. We also classify buildfarm machines by compiler_version> and config.guess doesn't give us that, unfortunately. However, I will look at canonicalising the architecture to the config.guess values reported. cheers andrew ---(end of broadcast)--- TIP 6: explain analyze is your friend
Re: [HACKERS] automatic system info tool?
Andrew Dunstan wrote: > Someone at the conference mentioned a tool that would portably and > reliably report system info such as architecture. What's wrong with config.guess? -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [HACKERS] automatic system info tool?
Andrew, > Someone at the conference mentioned a tool that would portably and > reliably report system info such as architecture. If someone has details > I would like to have them, as it would help solve the buildfarm > personality problem properly. There's potentially two, actually. A SF start-up is going to be open-sourcing a tool, soon, and Jim Nasby said that Distributed.net has code for this. -- Josh Berkus PostgreSQL @ Sun San Francisco ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
[HACKERS] automatic system info tool?
Someone at the conference mentioned a tool that would portably and reliably report system info such as architecture. If someone has details I would like to have them, as it would help solve the buildfarm personality problem properly. cheers andrew ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster