leco Posted May 31, 2009 Posted May 31, 2009 How do I find out how long a machine has been running for, please? I think there should be a way/service/application to do this - any suggestions?
meastaugh1 Posted May 31, 2009 Posted May 31, 2009 You could filter the system event log for 6013 which periodically reports the system uptime, or for an up to the minute reading, you could use: Uptime.exe Tool Allows You to Estimate Server Availability with Windows NT 4.0 SP4 or Higher and net stats srv will report the last reboot timestamp. 1
Sylv3r Posted May 31, 2009 Posted May 31, 2009 If its on the network - you could see what the uptime is by the time it has been connected. Via the status option on the network icon near the task bar or via Control Panel. 1
FN-GM Posted May 31, 2009 Posted May 31, 2009 If its on the network - you could see what the uptime is by the time it has been connected. Via the status option on the network icon near the task bar or via Control Panel. This is what i do...
leco Posted May 31, 2009 Author Posted May 31, 2009 Thanks all, will investigate the .exe and srv options. I hadn't realised that the network icon had such information. That;s a quick and easy solution. Many thanks.
Michael Posted May 31, 2009 Posted May 31, 2009 I agree the network status window is usually pretty accurate, especially on servers.
leco Posted May 31, 2009 Author Posted May 31, 2009 (edited) It is, as I suspected, a machine has been left running over the half term. So my next question is - how can I tell if anyone has logged in or accessed any files? This is not a server operating system but is running SIMS. Edited May 31, 2009 by leco
p858snake Posted May 31, 2009 Posted May 31, 2009 on xp try having a look CMD > net statistics {workstation/server} uptime is displayed as "statistics since DD/MM/YYYY HH:MM AM/PM"
SYNACK Posted May 31, 2009 Posted May 31, 2009 Umm there is an easier way that will give you a precise time with built in functions and it can even be run against a computer remotely: Hey, Scripting Guy! How Can I Determine the Uptime for a Server? strComputer = "."Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")Set colOperatingSystems = objWMIService.ExecQuery _ ("Select * From Win32_PerfFormattedData_PerfOS_System") For Each objOS in colOperatingSystems intSystemUptime = Int(objOS.SystemUpTime / 60) Wscript.Echo intSystemUptime & " minutes"Next WMI FTW!
SYNACK Posted May 31, 2009 Posted May 31, 2009 It is, as I suspected, a machine has been left running over the half term. So my next question is - how can I tell if anyone has logged in or accessed any files? This is not a server operating system but is running SIMS. Best bet would probably be the eventlog of the computer for this to look for profile load/unload events and other stuff that can signal actual use.
leco Posted May 31, 2009 Author Posted May 31, 2009 Umm there is an easier way that will give you a precise time with built in functions and it can even be run against a computer remotely: Hey, Scripting Guy! How Can I Determine the Uptime for a Server? Yes I saw that however, it seemed like a chore as I only wanted to determine if this particular machine had been on since before the hols. WMI FTW! Sorry not very well up on letter speak - but I'm sure you will be right:cool:
CyberNerd Posted May 31, 2009 Posted May 31, 2009 On Windows CLI: net statistics server or net stats srv On *nix CLI uptime
leco Posted May 31, 2009 Author Posted May 31, 2009 On Windows CLI: net statistics server or net stats srv Does that give stats for the specific computer? I'm guessing I have to be logged on at the computer.
RabbieBurns Posted May 31, 2009 Posted May 31, 2009 (edited) edit: hmm... should read to the end of the post first... Edited May 31, 2009 by RabbieBurns
Michael Posted May 31, 2009 Posted May 31, 2009 So my next question is - how can I tell if anyone has logged in or accessed any files? This is not a server operating system but is running SIMS. If the machine is still on, from the server navigate to Start > Run, type MMC and press enter. File > Add/Remove Snap-in > Add > Computer Management > Add > Finish > Close > OK. You can then look at the Event Viewer and Shared Folders. Shared Folders is what you're more after, as you can see who has any files open.
CyberNerd Posted May 31, 2009 Posted May 31, 2009 Does that give stats for the specific computer? I'm guessing I have to be logged on at the computer. yes, you have to be logged in, but you don't have to be sitting at it. on *nix just ssh username@computername on windows telnet username@computername you may need to turn telnet on with windows, you can also do this remotely by remote management. alternately use rdp/etc to log in and run the shell 1
teddybear Posted May 31, 2009 Posted May 31, 2009 What about using BgInfo to display details on the desktop? I've played with this in school, was used more at one of my last places of work. It can load when the user logs in and shows details you want it too. 2
leco Posted May 31, 2009 Author Posted May 31, 2009 If the machine is still on, from the server navigate to Start > Run, type MMC and press enter. File > Add/Remove Snap-in > Add > Computer Management > Add > Finish > Close > OK. You can then look at the Event Viewer and Shared Folders. Shared Folders is what you're more after, as you can see who has any files open. Thanks, I have looked at Shared Folders, which shows no open files currently. The computer has been on constantly for a fortnight and I haven't been informed that work was to be carried out in the holidays. What I was after was - had the machine been left on for a purpose, was someone in last week during the holidays, or had a shutdown been forgotten at the end of the Friday. Will wait until tomorrow and ask in the office. Thanks for the help everyone.
box_l Posted May 31, 2009 Posted May 31, 2009 also "systeminfo" at the CMD will also return uptime, (among other things). BoX 1
powdarrmonkey Posted May 31, 2009 Posted May 31, 2009 Sorry not very well up on letter speak - but I'm sure you will be right:cool: Windows Management Interface for the win. 1
leco Posted May 31, 2009 Author Posted May 31, 2009 Amazing what you learn just by asking a "simple" question. Thanks again.
powdarrmonkey Posted May 31, 2009 Posted May 31, 2009 NP. AFAICT with TLAs, YMMV but OTOH INED somebody explains them without saying "RTFM n00b".
leco Posted June 1, 2009 Author Posted June 1, 2009 NP. AFAICT with TLAs, YMMV but OTOH INED somebody explains them without saying "RTFM n00b". Now you're just ETM
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now