On Thu, 2005-08-18 at 13:24 +0530, Naganarasimha wrote:

> My OS on my comp is windows 2000 and I tried the same in suse linux it
> gives one gnome but 2 in KDE

> So can some one explain why is it (hrSystemNumUsers ) having more
> value then actually what it has 


This value is calculated differently on Windows- and Unix-based systems.
Under Windows, it uses the call NetWkstaGetInfo(), and takes the value
of the field wki102_logged_on_users.  From the MSDN documentation:

  wki102_logged_on_users
         Specifies the number of users who are logged on to the
         local computer.

I've no idea why this might be returning '2' instead of '1'.


Under Unix systems, the relevant code parses the /etc/utmp file,
and returns the number of active entries.  A bit of quick testing
seems to show that this lists one "user" for each shell window.
That's probably not unreasonable for a multi-user system accessed
remotely, but is rather misleading for a local ("single user") system
with a graphical desktop.  We might need to look again at how this
value is determined.

But that wouldn't affect Windows, since we're using a dedicated API
call to retrieve the value from the underlying O/S.

Dave


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to