Package oshi.driver.unix
Class Who
java.lang.Object
oshi.driver.unix.Who
Utility to query logged in users.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final DateTimeFormatterprivate static final DateTimeFormatterprivate static final Patternprivate static final Pattern -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static booleanmatchLinux(List<OSSession> whoList, String s) Attempt to match Linux WHO format and add to the listprivate static booleanAttempt to match Unix WHO format and add to the listqueryWho()Querywhoto get logged in users
-
Field Details
-
WHO_FORMAT_LINUX
-
WHO_DATE_FORMAT_LINUX
-
WHO_FORMAT_UNIX
-
WHO_DATE_FORMAT_UNIX
-
-
Constructor Details
-
Who
private Who()
-
-
Method Details
-
queryWho
Querywhoto get logged in users- Returns:
- A list of logged in user sessions
-
matchLinux
Attempt to match Linux WHO format and add to the list- Parameters:
whoList- the list to add tos- the string to match- Returns:
- true if successful, false otherwise
-
matchUnix
Attempt to match Unix WHO format and add to the list- Parameters:
whoList- the list to add tos- the string to match- Returns:
- true if successful, false otherwise
-