LogRhythm Interview Question: Linux doesn't contain 'real' ... | Glassdoor

Interview Question

Data Scientist Interview Boulder, CO

Linux doesn't contain 'real' files. Where can runtime

  system information (e.g. system memory, devices mounted, hardware configuration, etc) be found?
Answer

Interview Answer

2 Answers

0

Top, which is close, but wrong.

Interview Candidate on May 17, 2017
1

I believe the question would have been something like: There are some special "files" on linux, which not the disc and use a special filesystem (memory only - hence the "not real" part) , but they show real time information about the system like memory, process numbers and status, (and the stuff above).

This is the /proc directory. All files are text, so you can simply display them as shown in some of the links below.

the "top" command is probably "close" as it reads data from that location, as do other linux commands to show the status of processes and system.
https://superuser.com/questions/586897/where-does-top-command-get-all-the-data-for-cpu-utilization

Links:
http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/proc.html
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/3/html/Reference_Guide/ch-proc.html

Norbert on May 22, 2017

Add Answers or Comments

To comment on this, Sign In or Sign Up.