insert OS command results into a table on a remote system ?

insert OS command results into a table on a remote system ?

am 09.06.2010 18:10:44 von Kevin Kempter

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...

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: insert OS command results into a table on a remote system ?

am 09.06.2010 19:00:41 von Tim Landscheidt

Kevin Kempter 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


--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin