I would like to get system uptime in solaris. On linux I would do it like this:
#include <sys/sysinfo.h>
long long get_host_uptime()
{
struct sysinfo memInfo;
sysinfo( &memInfo );
return memInfo.uptime;
}
I would like to find some analog of sysinfo
for solaris as well.