pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
insert OS command results into a table on a remote system ?
2+ messages / 2 participants
[nested] [flat]

* insert OS command results into a table on a remote system ?
@ 2010-06-09 16:10 Kevin Kempter <kevink@consistentstate.com>
  2010-06-09 17:00 ` Re: insert OS command results into a table on a remote system ? Tim Landscheidt <tim@tim-landscheidt.de>
  0 siblings, 1 reply; 2+ messages in thread

From: Kevin Kempter @ 2010-06-09 16:10 UTC (permalink / raw)
  To: pgsql-admin

Hi All;

I want to gather OS command based stats such as the results of commands 
like: 'df' 'iostat' 'free' etc and put the results into a temp table that I 
can then select from. 

I need to do this all from the db since I wont have OS/shell access, 
only 'psql -h' access. Is this possible?  

Can I somehow leverage the '\!' meta command in psql to pull results of OS 
commands into a table?

Thanks in advance...



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: insert OS command results into a table on a remote system ?
  2010-06-09 16:10 insert OS command results into a table on a remote system ? Kevin Kempter <kevink@consistentstate.com>
@ 2010-06-09 17:00 ` Tim Landscheidt <tim@tim-landscheidt.de>
  0 siblings, 0 replies; 2+ messages in thread

From: Tim Landscheidt @ 2010-06-09 17:00 UTC (permalink / raw)
  To: pgsql-admin

Kevin Kempter <kevink@consistentstate.com> wrote:

> I want to gather OS command based stats such as the results of commands
> like: 'df' 'iostat' 'free' etc and put the results into a temp table that I
> can then select from.

> I need to do this all from the db since I wont have OS/shell access,
> only 'psql -h' access. Is this possible?

> Can I somehow leverage the '\!' meta command in psql to pull results of OS
> commands into a table?

psql's "\!" commands are executed on the /client/ box. You
could try using PL/Perl or PL/Python, but chances are that
if you aren't allowed shell access to the database server,
these paths of entry are also blocked.

Tim




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2010-06-09 17:00 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-06-09 16:10 insert OS command results into a table on a remote system ? Kevin Kempter <kevink@consistentstate.com>
2010-06-09 17:00 ` Tim Landscheidt <tim@tim-landscheidt.de>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox