It is currently September 30th, 2024, 1:28 am

simply displaying system uptime?

General topics related to Rainmeter.
FortKnox
Posts: 6
Joined: September 13th, 2012, 7:09 pm

simply displaying system uptime?

Post by FortKnox »

Hi,

So I'm running Windows 7, as well as cranking out a lot of work for the World Community Grid as my screensaver. Since I have Windows set to auto-hibernate, then every night when I go to bed, I unplug the laptop so it's not a fire hazard during my sleep, and let the W.C.G. screensaver grind away until the battery runs out. Then because of auto-hibernate, in the morning I plug in, turn on, and I'm right back where I left off. I've donated quite a good bit of hours to W.C.G. via this habit.

However, this run-until-auto-hibernate process means it is often [i]quite[/i] a long time between reboots, which I think I read is good for keeping your system running healthy. So I started looking for a Windows 7 desktop gadget that would display how long my system has been up and running... surprisingly, I didn't find one. And there's a billion pages that claim to have a link to some app that does this, yet all of those links seem to be broken.

So I found Rainmeter. Is it possible to simply have it display the system uptime, and if so, how?

Thanks ever so much,
Jeff
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: simply displaying system uptime?

Post by Kaelri »

This is one of Rainmeter's built-in features, and it is included in many popular skins, including our featured suites. If you don't find any pre-made skins to your liking, you can also learn how to make your own.

As a demonstration, here's a dead-simple, fully-functional Uptime skin:

Code: Select all

[MeasureUptime]
Measure=Uptime

[MeterUptime]
Meter=String
MeasureName=MeasureUptime
MeterStyle=StyleUptime

[StyleUptime]
FontColor=FFFFFF
FontSize=12
FontFace=Segoe UI
StringStyle=Bold
SolidColor=00000001
AntiAlias=1
You do not have the required permissions to view the files attached to this post.
FortKnox
Posts: 6
Joined: September 13th, 2012, 7:09 pm

Re: simply displaying system uptime?

Post by FortKnox »

Many many thanks!
FortKnox
Posts: 6
Joined: September 13th, 2012, 7:09 pm

Re: simply displaying system uptime?

Post by FortKnox »

Now that I've actually done it, THANKS SO MUCH ALL! THIS IS THE COOLEST TOOL _EVER_!!! :D This is all I ever wanted, right here:
[Rainmeter]
Update=1000

[MeasureUpTime]
Measure=UpTime
Format="%4!i! Days, %3!i! Hours, %2!i! Minutes"

[MeterUpTime]
Meter=String
MeasureName=MeasureUpTime
X=1010
Y=610
FontSize=12
FontColor=255,255,255,255
AntiAlias=1
Text=System UpTime: %1
User avatar
jsmorley
Developer
Posts: 22793
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: simply displaying system uptime?

Post by jsmorley »

FortKnox wrote:Now that I've actually done it, THANKS SO MUCH ALL! THIS IS THE COOLEST TOOL _EVER_!!! :D This is all I ever wanted, right here:
[Rainmeter]
Update=1000

[MeasureUpTime]
Measure=UpTime
Format="%4!i! Days, %3!i! Hours, %2!i! Minutes"

[MeterUpTime]
Meter=String
MeasureName=MeasureUpTime
X=1010
Y=610
FontSize=12
FontColor=255,255,255,255
AntiAlias=1
Text=System UpTime: %1
One thing you don't need (and really don't want) to do is to use X and Y to "position" the skin on your screen. The X and Y options on a meter are not to position the "skin on the screen", but to position the "meter in the skin".

Since you only have one element in the skin, you can just leave off the X and Y settings in this skin, and just drag it where you want it.
FortKnox
Posts: 6
Joined: September 13th, 2012, 7:09 pm

Re: simply displaying system uptime?

Post by FortKnox »

Well... shucks. The whole point of implementing this MeasureUpTime counter was to-- because of my daily use of auto-hibernate-- keep track of how long it's been since an actual reboot. But in my first real day of having this counter on my screen, it appears as though it's only counting since I last woke the machine from hibernation, NOT since a reboot. Is there a different counter that will not get reset when the machine goes into hibernation but will get reset when the machine reboots? This behavior seems rather odd, since the point of hibernation is to write the exact state of the system to disk then put everything to sleep...
Thanks much,
Jeff
p.s. does anyone know if having the machine go automatically into hibernation is just as good as a reboot? I'm unsure of the precise health benefits of a reboot, so maybe this whole idea doesn't really matter, maybe entering auto-hibernate is just as good...
User avatar
UnforgivenRevival
Posts: 310
Joined: June 7th, 2012, 2:25 am
Location: Philadelphia, PA

Re: simply displaying system uptime?

Post by UnforgivenRevival »

"System Uptime" is what it states, When the computer is "up" and running.

Hibernation state is almost the same as shutting down the computer in a way. Saving the hard drive from spinning and wearing down along with your fans and stuff. But Software wise, it tends to "save" all your memory cache on the drive, writing it to the drive and reading it back into memory when the computer is put into hibernation and woken up, wearing the drive also.

If anything, I just put the computer to sleep instead of hibernation. Sleep state keeps everything in memory and spins down the drive with quick wake up time, Minimizing wear as much as possible, along with months before the battery will die even in sleep state.

EDIT: The only real benefit of shutting down, is clearing the entire memory cache, starting fresh.

Back to my point, System uptime is about ONLY when the computer is in the "on" state. You probably will want to use one of the new "Timestamp" features that is created when your computer boots up, and resets itself on shutdown or something along them lines.

http://rainmeter.net/forum/viewtopic.php?f=106&t=13353
FortKnox
Posts: 6
Joined: September 13th, 2012, 7:09 pm

Re: simply displaying system uptime?

Post by FortKnox »

Thank you, but I'm sorry, I still don't follow. I fail to see how that new "Timestamp" addresses my inquiry.
...
WELL I'LL BE DOGGONED! I checked my power settings, and it's not at all what I thought they were! I found "Hibernate after: [on battery] ___never___". Huh! I didn't realize that! So my system must just be running until the battery runs out, and right before that happens enters hibernation since when I wake it up it's just as I left it...

THAT ASIDE, I still don't have a clear understanding of if it's good for system health to perform an actual reboot every so often, as opposed to the hibernation cycle described above. And then if a reboot IS actually better for system health, that's what started this thread, I'm just trying to find the clock that's been running since the last reboot. Any more help is appreciated greatly!
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: simply displaying system uptime?

Post by Kaelri »

As UnforgivenRevival explained, the difference between hibernate and shutdown/restart is that hibernating only gives your hardware a rest. I think this is good to do from time to time, but not crucial, unless you tend to run performance-intensive processes for long periods. It's a little more important for laptops, too, since they tend to have poor ventilation compared to desktops, and your battery life will suffer if it never gets a chance to cool down.

Shutdown/restart, on the other hand, is also good for the software. It clears your memory cache, and allows Windows to install updates and perform other maintenance processes (such as deleting temporary files). Restarting your system from a clean slate is known to resolve performance issues and/or prevent issues that would eventually occur, and while modern operating systems (such as Windows 7) are much better at managing themselves, the benefits have not disappeared. I would recommend a clean reboot at least once a week.

As for the topic at hand: it seems that this is a known issue with recording the system uptime in Windows, and may be related to either BIOS or Windows itself. In either case, this is probably not something we can fix, since Rainmeter has no way to tell the difference between a restart and a hibernation. There may be ways to work around it, but they would be much more complicated than your current skin.
FortKnox
Posts: 6
Joined: September 13th, 2012, 7:09 pm

Re: simply displaying system uptime?

Post by FortKnox »

Thanks much for the explanation Kaelri! :welcome: It all comes down to this then: "since Rainmeter has no way to tell the difference between a restart and a hibernation." That was exactly the original intent behind this question, to which the answer is "Sorry, this shop's closed, come again another day." No problem, thanks for clarifying...