Thursday, April 25, 2024
68
rated 0 times [  68] [ 0]  / answers: 1 / hits: 47111  / 3 Years ago, fri, october 8, 2021, 3:09:53

I was wondering if it is at all possible to find out when the computer was switched on, what files where accessed what folders were opened, what programs run and when the computer was resumed and put back to sleep (just like in the movies).



I know this isn't that important but it would be cool to know.


More From » administration

 Answers
6

When was the machine turned on:



uptime


Example from my notebook:



20:06:33 up  1:50,  2 users,  load average: 0.03, 0.04, 0.05


That is current time, uptime, amount of users and the load average.



What programs run:




  • Command line



    ps -ef|more


    enter image description here


  • GUI - System monitor (dash, system monitor):



    enter image description here




When the computer was resumed or sleep



last


enter image description here



what folders were opened



what files where accessed



None of these I know a command for. Natty has activity journal for files.



Other interesting things...




  • To see when the users logged in the last time: lastlog.



    enter image description here


  • Login failure: faillog.



    last, lastlog, faillog make use of log file /var/log/wtmp (last), /var/log/lastlog and /var/log/faillog. If those are not active you will not get any result.


  • lsof shows a list of currently open files.



    enter image description here



    It can do alot of checks on a lot of options. From man lsof:




    To list all open IPv4 network files in use by the process whose PID is 1234, use:



    lsof -i 4 -a -p 1234


    To list all open files for login name ``abe'', or user ID 1234, or process 456, or process 123, or process 789, use:



    lsof -p 456,123,789 -u 1234,abe


    To list all open files on device /dev/hd4, use:



    lsof /dev/hd4



[#44428] Saturday, October 9, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
riffnkful

Total Points: 390
Total Questions: 123
Total Answers: 110

Location: Puerto Rico
Member since Sat, Mar 13, 2021
3 Years ago
riffnkful questions
Thu, Nov 17, 22, 04:24, 1 Year ago
Mon, Nov 28, 22, 01:40, 1 Year ago
Mon, Jul 11, 22, 13:24, 2 Years ago
Sun, Feb 5, 23, 05:06, 1 Year ago
;