Programming :: Get System Uptime In YYMMDD Format?

Feb 22, 2010

language: cOs: ubuntu 9.10 want a c or c++ program that gives the system uptime in YYYY: MM: DD HH : MM: SS format.eally it is head ditching..This is not home work or assisgnment..

View 10 Replies


Server :: Init Uptime Longer Than System Uptime?

Sep 15, 2010

How can init process uptime be longer than the uptime of whole system?

martin@server:~> ps -p 1 -o pid,cmd,bsdtime,start
1 init [3] 20:50 Mar 05
martin@server:~> uptime
2:23pm up 559 days 1:42, 10 users, load average: 0.18, 0.28, 0.34

View 1 Replies View Related

General :: Uptime - Getting Date & Time Of System Startup?

Mar 28, 2011

I know that uptime prints the time a machine has been up and running, but is there an easier (reliable) way to get the date of the start up than counting down from this output?I tried looking around /proc, but didn't find anything of relevance. There's also a line like this on my dmesg: [ 0.673492] rtc_cmos rtc_cmos: setting system clock to 2011-03-14 14:26:52 UTC (1300112812), but I'm wondering if this method is distribution and kernel version agnostic.

View 5 Replies View Related

General :: Difference Between System Uptime And Last Boot Time?

May 11, 2011

My Linux system was last rebooted few hours ago. But it seems little confusing for me to figure out the exact reason behind it. I guess following command should justify what i meant to say.

# date
Wed May 11 13:22:49 IST 2011
# last | grep "May 10"
reboot system boot 2.6.18-194.el5 Tue May 10 17:35 (19:46)
root pts/1 XXXX Tue May 10 17:24 - 18:18 (00:53)


My question is Why the uptime is saying that the system is up since last 47 min.It should be more than 1 day if i m not wrong.

View 2 Replies View Related

General :: Calculation Of Working Time Based On System Uptime

Jul 28, 2010

I know several tools that allow tracking time spend on different tasks / projects.Is there any existing tool for very very simplified work-time-tracking.I am an employee, come to the office, switch on my laptop directly. I have mostly around 1 hr lunchtime, but sometimes less, sometimes more.At around 18:00 I want to type one command in the console (or simple GUI would also be okay of course) that tells me:"1 hour overworked. Go home now! (came at 8:00, 1 hour standard lunch-break)."

View 1 Replies View Related

General :: Last Uptime After Reboot?

Dec 3, 2010

I want to know if there is a way to know the uptime for a server after a reboot process, I need that information for a statistic, but I forgot to take the uptime before reboot the server, so I am looking for that information after the server is power on.

View 1 Replies View Related

Debian :: GNU - Resets It's Uptime Every 497 - 498 - Days

Sep 10, 2010

I've read from some Web-page that GNU/Linux resets it's uptime every 497 (498) days... So even if GNU system works 1000 days, uptime never will be more then 497 (498) days. Is it true?

View 2 Replies View Related

Debian :: Silent Lenny After 1-3day Uptime?

Apr 14, 2010

This seems like a nicely populated forum so I hope some knowledgeable people happen to see this thread.

I've been encountering this issue where the system will not respond to seemingly anything after being on for generally no shorter than a day but sometimes as long as three days. This has been going on for few months since I only have physical access to the machine for about a day or two once every two weeks. So I'll come to the machine, reboot it, it will be fine for a day; then about a day after I'm away from it, it will not respond in any way. When I am away from it I only have ssh access, but when I'm with it, I have access to anything and everything.

After it locks up into the silent issue I have tried: ssh either remotely or locally, where it will time outPinging from the local network, where I get "ping: sendto: Host is down" a lot and occasionally a "ping: sendto: Host is down"Plugging in a monitor and keyboard, where the monitor never gets a signal no matter what I do on the keyboard. When it isn't locked up into the silent issue and I plug in the keyboard and monitor, the monitor gets a signal right after I hit the spacebar for sure. After the silent issue triggers it's fans still whir, the power light is on and light on the Ethernet port is on (and turns off if I unplug the Ethernet cable, and back on if I plug it back in) like everything was normal but there is no hard drive or network activity (even after unplugging/replugging the Ethernet cable).

After a reboot, all log files have nothing past a certain time and date, which I assume is the time when the silent issue got triggered. My setup is the following: Debian 5.0 "lenny" on an HP ProLiant ML110 G6Using full disk encryption with ext3 which was all set up by the installerIIRC "core" and "minimal" were selected in tasksel during install. I'm sure about "core", not about "minimal". The programs I have running are apticron, ddclient, sshd, fail2ban, screen, php-cgi (php5-cgi), cherokee (from unstable) and rtorrent (from unstable). I can provide a "ps aux" if necessary. The packages from unstable, that I have all set to Pin-Priority 990 in /etc/apt/preferences, are:


I'm pretty sure I don't have ECC memory so I don't think a lockup from a flipped bit is an issue. I'm thinking one thing to test would be to set up some kind of daemon that sends log info over the network to a logging server and compare the latest timestamps of what the daemon sent versus what the latest info on the disk is, and that would show that the issue is with the encrypted disk since things are still functioning in memory but not able to write to disk. If that's the case then I guess it locks up eventually from not being able to read or write something. Does anyone know of something out there like this? Or perhaps a way to do something similar?

Is there something I could do to determine whether this is caused by maybe some kind of kernel panic or by something like the motherboard having issues?

View 7 Replies View Related

Ubuntu :: Write A Script To Gather The Uptime Of A Box?

Jun 23, 2011

trying to write a script to gather the uptime of a box and send an email out if the box has died. Problem being that this is hard when `uptime` changed from the format 23:59 to 1 day. Is there a method to just see the uptime in hours or minutes or even seconds?

View 4 Replies View Related

Red Hat :: Uptime Dropped Dramatically But No Reboot Logged Anywhere?

Apr 22, 2010

This is an observation of something that I can't explain. Its not a problem in itself.


View 2 Replies View Related

Ubuntu :: Format HDD For Use With System?

Aug 16, 2010

I added an extra hard drive to my computer for backup purposes. I had used it with a windows system and it was NTFS before I formatted it. I used the recommended ext4 format. However, I cannot access the disk. It shows up on my desktop, but there's only one folder on it called lost+found and I cannot drop files into it. What else do I need to do to use the drive?

View 9 Replies View Related

Ubuntu Servers :: Server With Planned Short Uptime?

Jul 27, 2010

I've installed Ubuntu server on a small box with a couple of large hard drives to use as a remote backup server. Since my backups will run nightly in the wee hours, I'm configuring this to use Wake-on-LAN to start the server and run the backup. Once the backup completes - probably on the order of an hour later - another script shuts the server down. Once in a while I'll remote in to update packages and check on the status of the system, though I can check backup logs to insure that is still running.

Need I be concerned about the various cron jobs that periodically run to tidy things up? Should I periodically - say once/month - leave the system up for a full day to make sure that everything that needs to happen will run?

View 9 Replies View Related

Programming :: Awk: How To Keep The Format Of The Record

Apr 5, 2010

In /etc/fstab, I have a record:LABEL=/< >/< >ext3< >default,nolog< >1 1 represent a tab between 2 fieldsI just want to remove "nolog" in the 4th field (only): gsub(/nolog/,"",$4)The function work ok but it returns a record:LABEL=/ / ext3 default 1 1I know the problem is OFS=" ", but how can I keep the format of the record? (the same number of tabs, spaces).

View 5 Replies View Related

Programming :: Best Way To Transform XML Format?

Sep 10, 2010

I'm looking for some expert opinion on sed/script to work out the best way to transform one xml format into another however there are a few complexities around translation.

The extra complexities are to:
1) Take the start and stop time (YYYYMMDDHHMMSS) and convert to start time to unix time plus output the difference in seconds between both times.
2) Oid, tsid and sid are found by looking up an external file and finding the value against the channel. For example one of the lines in the file will be 2:806:27e2=channel1

Is there any way to write piped sed commands that can do this? If not, any ideas how the script should look like?

Input File
<programme start="20100910060000 +0100" stop="20100910061000 +0100" channel="channel1">
<title lang="en">This is the title</title>
<desc>This is the description</desc>
Output File

<service oid="0002" tsid="0806" sid="27e2">
<event id="0">
<name lang="OFF" string="This is the title"/>
<text lang="OFF" string="This is the description"/>
<time start_time="1284098400" duration="600"/>

Look up file for oid, tsid and sid

View 8 Replies View Related

General :: Possible To Format System Drive As NTFS?

Feb 2, 2010

Is it possible to format a Fat32 Ubuntu system drive to ntfs leaving the program and data undisturbed? I created a gparted liveCD and used it to format a slave drive to ntfs. It worked perfectly. Can the gparted liveCD be used on the master drive similarly without destroying the existing files on it?

AMD 1700 2.66ghz, 1gb memory, 80gb HDD plus 60gb HDD, Nvidia TNT2 AGP Video, DVD +/-RW, running Ubuntu Intrepid Ibex 8.10 Standard Desktop installation

View 2 Replies View Related

Programming :: Format Int 1 To String 0001 In C++?

Feb 16, 2011

In C++ as subjected, can anyone throw me some light on how I can generic-ly format an integer value of 1 to a string value of 0001? 11 to 0011? and 111 to 0111? simply by just appending 0 in front and limiting the length of the string to 4?

View 4 Replies View Related

Programming :: Scan In A File Which Has The Format?

Apr 3, 2011

I am trying to scan in a file which has the format of

right now my program says
Scanner fin = null;
fin = new Scanner(new FileReader("proj1/passwd.txt"));


How do i correctly use delimiter to take in only the strings on one line?

View 1 Replies View Related

Programming :: Sed - Series Of Files In The Format

Sep 21, 2009

I have a series of files in the format:

Which I'm trying to split using sed to have each field/value pair on on line:

So far so simple, but some of the values might have commas in them, which means they'll be split up. Is there a way to change this so that only commas not within quotes will be replaced with ? (e.g. make sed count number of " and if it finds a , after counting an odd number of " then ignore it?)

View 2 Replies View Related

Ubuntu Servers :: Server Ram Usage Increases Dramatically After A Few Days Of Uptime?

Jan 31, 2010

I was wondering why after a couple of days of my ubuntu server running, that it goes from starting off at 94mb of ram usage all the way up to 498mb of ram usage?

View 2 Replies View Related

Ubuntu Servers :: Mail Server Will Not Receive Emails After Uptime Over One Hour?

Jan 12, 2011

It is the strangest thing. I can not receive emails on this server after it has been up for an hour. I noticed that everytime and email is received that a sshd opens but never closes. Causeing a memory issue that I dont know how to fix. Also the mailq grows and grows. Mostly with email stating the recipient and send are both [URL].. also shows mail system configuration error. I have to restart the server every 30 minutes so users can get and send emails. This is horrible because for every 5 minutes out of the hour emails are bouncing.i have looked through them but I know not what I am looking at.

PS. I was thrown into the position and have limited knowledge. I am used to a GUI.

View 4 Replies View Related

Debian :: How To Format CF Card With Fat32 File System

Dec 29, 2015

I'm not that new in Linux I've been using for years since 2010 mostly, and formatted a number of flash drives with allegedly fat32 fs however, this time I need to be sure I'm formatting it as fat32 for experimental reasons and I can't seen to find a mkfs.fat32, both vfat and fat are fat16 and I don't know what msdos does...

View 4 Replies View Related

Debian Multimedia :: Change Date Format Across Whole System?

Jan 13, 2015

I'm having an US American date format that drives me totally nuts, like MM/DD/YY. Today is 1/13/15. It seems to appear across the system (GNOME 3), from Skype to IceDove to Nautilus. So my hope is there is a central instance where I can change this. I would prefer to have 13-Jan-15 or 13-Jan-2015 or at the very least 13/01/2015, i.e. in some order consistent with my European brain.

View 7 Replies View Related

Ubuntu :: Reset The System Which Will Also Format The Hard Drive?

Jan 28, 2010

I've currently got 9.10 and have (somehow) managed to mess the system up already!It's a new computer so I'm not fussed about data loss etc, but is there a way to completely reset the system which will also format the hard drive (as it was a download that has messed it up!) without losing the O/S?

View 9 Replies View Related

Ubuntu :: File System Format For Mac OSX 10.5 For Large Files?

Sep 19, 2010

Is there a file system that both Mac OSX 10.5 and linux can read/write for large files (like 4gb files)? My desktop is Ubuntu and I run most from there, but I want to back up my MacBook and linux box on the same external hard drive. Seems there are some (paid) apps for Mac that will mount NTFS but I'm wondering if there is just a shared files ystem that will work for both.

View 9 Replies View Related

General :: Dont Want To Delete Programs Though Format The System?

May 4, 2010

i have ubuntu 9.10i format my ubuntu partition any times,but i dont want to remove programs from it ,so what can i do

View 4 Replies View Related

Programming :: Curl: (3) URL Using Bad/illegal Format Or Missing URL

Feb 16, 2011

What is the problem? I receive this message (see in red) when i running this script (below) on bash script file:

error received:

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 70 0 70 0 0 321 0 --:--:-- --:--:-- --:--:-- 0


View 1 Replies View Related

Programming :: IEEE Floating Point Format?

Jun 5, 2011

I'm reading a book on assembly, and it talks a bit about the IEEE floating point format.


To summarize, the following steps are used to convert a decimal number to IEEE single format: 1. The leading bit of the floating point format is 0 for a positive number and 1 for a negative number. 2. Write the unsigned number in binary. 3. Write the binary number in binary scientific notation f23.f22 ... f0 2^e, where f23 = 1. There are 24 fraction bits, but it is not necessary to write trailing 0's. 4. Add a bias of 127 to the exponent e. This sum, in binary form, is the next 8 bits of the answer, following the sign bit. (Adding a bias is an alternative to storing the exponent as a signed number.) 5. The fraction bits f22f21 ... f0 form the last 23 bits of the floating point number. The leading bit f23 (which is always 1) is dropped.

View 1 Replies View Related

Programming :: Reading A Simple File Format In C?

Dec 16, 2010

I made a string key-value mapping struct in C, and functions to add and remove entries. I would also like to write a function to read in this file format:

key: value
another: another value


View 14 Replies View Related

Ubuntu Security :: Two Passwords, 1st Normal, 2nd Triggers System Format?

Jan 17, 2011

I'd like to know if something like this already exists :have an ecryptfs encrypted user account on a laptop that accepts two logins, 1st logs normally, the second triggers a system format

View 6 Replies View Related

Ubuntu :: Cannot Format CD / DVDs - Error Creating File System

Feb 4, 2011

Installed Ubuntu 10.10 and it works very well except I cant format cd or dvds. I am using the disk utility program in administration and keep getting the following error:

Error creating file system: helper exited with exit code 1: Error calling fsync(2) on /dev/sr0: Input/output error

I have tried mounting and unmounting - makes no difference.

View 3 Replies View Related

Copyrights 2005-15, All rights reserved