PostgreSQL: Getting service uptime

/* SQL Command within postgres: */ SELECT now() - pg_postmaster_start_time() uptime /* using psql command line utility deployed with Postgres: */ $> psql -c "SELECT now() - pg_postmaster_start_time() uptime"
This sql script is used for knowing database service uptime in PostGreSQL using psql command line utility deployed with the database engine.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.