473,396 Members | 2,113 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

uptime script for openbsd

hello..
could anyone please help me build a uptime script for openbsd?
i tried phpsysinfo, it doesn't work (only uptime works, and that's
around 15k days :p)
i tried these:

<?php
$uptime_output = system("uptime", $uptime_output);
print $uptime_output;
?>

<?php
$uptime = shell_exec("cut -d. f1 /proc/uptime");
$days = floor($uptime/60/60%24);
$hours = $uptime/60/60%24;
$mins = $uptime%60;
$secs = $uptime%60;
echo "current uptime is $days days, $hours hours, $mins minutes and
$secs seconds";
?>

but none of these works.

i 'd appreciate your help
tia, alex

Apr 10 '07 #1
0 1640

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Noah | last post by:
I'm getting configure warnings and make errors when I try to build Python 2.3.4 under OpenBSD 3.5. I don't see anything in the README under "Platform specific note" for OpenBSD. I tried opening...
8
by: Oli Schwarz | last post by:
Hello, how can I read out the uptime of a unix system in python (Linux and *BSD). I have not found a uptime-function in the Library. Regards Oli
24
by: Esmail Bonakdarian | last post by:
Hi, Is there a way to display how long a Win XP system has been up? Somewhat analogous to the *nix uptime command. Thanks, Esmail
2
by: Steph L | last post by:
Hi, A given Milter program compiles ok on OpenBSD/FreeBSD/Linux but not on Solaris : it uses daemon(3) http://www.openbsd.org/cgi-bin/man.cgi?query=daemon&apropos=0&sektion...
6
by: MA | last post by:
Hi all! I know there is other newsgroups for webservices, but I donīt get any answers on those. I have developed a webservice that writeing and reading files in different folders. Question...
1
by: Geoff | last post by:
Hi! I'm wanting to use openbsd to run a webserver because of its high security. The website is written in python. Before I was using linux with apache 2 and mod_python and this worked well. My...
1
by: nazgul | last post by:
Hi all, I have an app that runs on multiple boxes. On my slackware box, running Python 2.5.1, top shows this: Mem: 1002736k total, 453268k used, 549468k free, 31392k buffers Swap: ...
5
by: nazgul | last post by:
Hi all, In my prev post, I indicated I was using 2.5.1 on one box and 2.5p3 on the OpenBSD box. I'm trying to build 2.5.1 on OpenBSD and I get this: Modules/posixmodule.c:5701: error: `lstat'...
8
by: Guy Macon | last post by:
How to increase web server uptime with DNS failover: For illustration, let's start with some really bad hosting... Find four free web hosts that are each 90% reliable -- in other words they...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.