Issue the following SQL from any interface:
postgres=# SELECT date_trunc('second', current_timestamp - pg_postmaster_start_time()) as uptime;
You should get output as follows:
uptime -------------------------------------- 2 days 02:48:04