Package oshi.driver.linux.proc
Class UserGroupInfo
java.lang.Object
oshi.driver.linux.proc.UserGroupInfo
@ThreadSafe public final class UserGroupInfo extends java.lang.Object
Utility class to temporarily cache the userID and group maps in Linux, for
parsing process ownership. Cache expires after one minute.
-
Method Summary
Modifier and Type Method Description static java.lang.String
getGroupName(java.lang.String groupId)
Gets the group name for a given IDstatic java.lang.String
getUser(java.lang.String userId)
Gets a user from their ID
-
Method Details
-
getUser
public static java.lang.String getUser(java.lang.String userId)Gets a user from their ID- Parameters:
userId
- a user ID- Returns:
- a pair containing that user id as the first element and the user name as the second
-
getGroupName
public static java.lang.String getGroupName(java.lang.String groupId)Gets the group name for a given ID- Parameters:
groupId
- aString
object.- Returns:
- a
String
object.
-