Class Who

java.lang.Object
oshi.util.driver.unix.Who

@ThreadSafe public final class Who extends Object
Utility to query logged in users using the who command with Unix date format parsing.
  • Method Details

    • queryWho

      public static List<OSSession> queryWho()
      Query who to get logged in users, parsing Unix date format.
      Returns:
      A list of logged in user sessions
    • matchUnix

      public static boolean matchUnix(List<OSSession> whoList, String s)
      Attempt to match Unix WHO format and add to the list.
      Parameters:
      whoList - the list to add to
      s - the string to match
      Returns:
      true if successful, false otherwise