> Rather than do system('uptime') and incur the process start-up each time, > you could do fp = popen('vmstat 60', 'r'), then just read the fp. popen doesn't incur a process start? Get real. But you're right, popen() is the right call not system(), because you need to read the stdout. > I believe vmstat is fairly standard. Not more so than uptime --- and the latter's output format is definitely less variable across platforms. The HPUX man page goes so far as to say WARNINGS Users of vmstat must not rely on the exact field widths and spacing of its output, as these will vary depending on the system, the release of HP-UX, and the data to be displayed. and that's just for *one* platform. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html
- Re: [HACKERS] refusing connections based on load ... Tom Lane
- Re: [HACKERS] refusing connections based on load ..... The Hermit Hacker
- Re: [HACKERS] refusing connections based on loa... Tom Lane
- Re: [HACKERS] refusing connections based on... Ian Lance Taylor
- Re: [HACKERS] refusing connections base... The Hermit Hacker
- Re: [HACKERS] refusing connections based on... The Hermit Hacker
- Re: [HACKERS] refusing connections based on... Nathan Myers
- Re: [HACKERS] refusing connections based on... Neal Norwitz
- Re: [HACKERS] refusing connections base... Tom Lane
- Re: [HACKERS] refusing connections... Doug McNaught
- Re: [HACKERS] refusing connect... Peter Eisentraut
- Re: [HACKERS] refusing connect... Christopher Masto
- Re: [HACKERS] refusing connect... Tom Lane
- Re: [HACKERS] refusing connect... Peter Eisentraut
- Re: [HACKERS] refusing connect... The Hermit Hacker
- Re: [HACKERS] refusing connect... Jan Wieck
- Re: [HACKERS] refusing connect... Tom Lane
- Re: [HACKERS] refusing connect... The Hermit Hacker
- Re: [HACKERS] refusing connect... Tom Lane