A few Unix commands can provide you with answers to questions about your system: “Who is logged in?” “What are they doing?” “What jobs are taking up all my CPU cycles?” “How long has my system been up?”
uptime tells you how long it has been since you last restarted and what your workload is.
who tells you who is logged into your system, where they’re logged in from, and when they logged in.
w tells you who is online and what they are doing.
last tells you who has logged onto your computer.
ps and top tell you what jobs are running on your computer.