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 DateTimeFormatter
private static final DateTimeFormatter
private static final Pattern
private static final Pattern
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static boolean
matchLinux
(List<OSSession> whoList, String s) Attempt to match Linux WHO format and add to the listprivate static boolean
Attempt to match Unix WHO format and add to the listqueryWho()
Querywho
to 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
Querywho
to 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
-