Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a server running windows 2000 right now, will upgrade to 2003 pretty soon. Is there a way to check the user status and pc status?

For example,

  • If the user is idle
  • If the PC is locked
  • How long the user has been logged in

Doesn't matter if it does not work in windows 2000, though it'll be great if it does.

Thanks for any help :)

share|improve this question
    
These seem like odd things to monitor on a server. What is the problem you're trying to solve? –  Chris Jul 23 '09 at 14:37

3 Answers 3

up vote 2 down vote accepted

There is no built-in functionality to do any of the things you're asking for in either the server or client operating system, (and you're not going to see any new functionality moving from W2K to W2K3 on your servers). You're going to have to code something to get what you want.

With respect to the server computer, "logon" doesn't mean what you think it does. An "Interactive" logon on a client computer definitely has a starting time and an ending time. The "logon" from the client to remote server computers will depend on what the client is doing. Terminal Services logons from a client to a server are "Interactive" and share the properties of a client's own "Interactive" session.

I'm assuming that you probably want to know the duration of the "Interactive" session on a client computer. You can have a look at querying the Win32_LogonSession WMI class as a way to get that information.

I think you're thinking that you can use the event logs on a server computer to figure out when client computers go thru an "Interactive" logon. You can't.

Doing the initial domain authentication or accessing a "mapped" "drive" on a server computer from a client computer is a "Network" logon, and the times associated with the logon and logoff will relate to when the client begins to access the resource and when the client (or server) closes the connection for inactivity (or an "unmapping" or "Interactive" logoff of the user's client session).

You shouldn't think of "Domain Logons" or Microsoft File and Print sessions like SSH or TELNET sessions in having a fixed duration that begins when the user "logs on" and ends when the user "logs off". The connection to the server computer may come up and down during normal use of the client computer. Using the server-side event log to determine the duration of an "Interactive" session on a client computer is no good.

There's some sample code here to detect if the workstation is locked: http://www.codeproject.com/KB/vb/DetectWindowslockunlock.aspx Again, you could adapt that from C# to any language that can call the necessary APIs.

It sounds like the rest of what you want to know is in the screensaver state, mainly. Here's a Microsoft article that describes checking the screensaver state with a Win32 API call (using VB in the example, but you could do it in any language that lets you call that API): http://support.microsoft.com/kb/315725

If you define "idle" as the screensaver running then you can get "idleness" the same way. If you have some different definition of "idle" then you're on your own-- the OS won't help you with that.

share|improve this answer
    
I'm pretty new to windows servers, that explains a lot of things. Thanks! –  saint Jul 23 '09 at 16:37

I'm afraid I don't remember if this works in 2000, but the File Server Management MMC should let you see how long a session to the file server has been open and how long the session has been idle. That won't necessarily reflect the full client state.

I don't believe you can find out whether the PC is locked from the file server. However, I'm reasonably certain that a script on the client could.

share|improve this answer

I don't know exactly what your goal is (or what problem you're solving), but if you have remote desktop software like VNC working on the client you can log into that to see what is happening on the console. Just have to remember that the free version has no encryption available; it sounded like you wanted to check what the client machines were doing when you want to upgrade them.

One possible way to do that is, on the server the clients would use, right click my computer and go to the manage link and check the open sessions and open files list, then if you have VNC on those clients connect to the IP's and see what's going on.

Or you can use "net send" from a command prompt to broadcast that you need everyone to log off the system.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.