Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Oracle Standby Database Library Index from Metalink Oracle
  • Best approach for Oracle database patching sequence to latest/required patchset along with CPU/PSU/any-other-one-off patch ID 865255.1 Oracle
  • Some useful Unix Commands Linux/Unix
  • Backup and Recovery Scenarios Oracle
  • How To Transfer Passwords Between Databases (ref note: 199582.1) Oracle
  • ORA-01220 Oracle
  • How to remove blank lines using vi editor command Linux/Unix
  • DBA_HIST_SQLSTAT contents Oracle
  • CTAS with LONG Column for 9i and higher Oracle
  • Implementing Listener Security Oracle
  • Export With Query Another Example. Oracle
  • Adding or Dropping Online Redo Log Files When Physical Standby in place Oracle
  • Session_info.ksh Linux/Unix
  • How to find password change date for user Oracle
  • 276434.1 Modifying the VIP or VIP Hostname of a 10g or 11g Oracle Clusterware Node Oracle

More info about /proc folder and its relation with processes.

Posted on 27-Nov-2009 By Admin No Comments on More info about /proc folder and its relation with processes.

One of the most interesting directories on any Linux system is /proc, a virtual filesystem that provides a plethora of information on the hardware of the running system, and of the various processes running. In fact, many programs such as ps and top obtain their information by mining /proc.

Some well-known virtual files in /proc include /proc/cpuinfo, which prints out information on the running CPU(s); /proc/meminfo, which prints out information on installed memory; and /proc/cmdline, which provides the arguments to the Linux kernel at boot.

Other lesser-known files in /proc include:

|> /proc/apm, which provides information related to Advanced Power Management, if installed

|> /proc/loadavg shows the system load average

|> /proc/filesystems shows the available filesystem support in the kernel and whether or not they are in use on a block device

|> /proc/mounts will show what mounts are currently active, what block device they belong to, where they are mounted, and what options were used to mount them

|> /proc/net directory contains more files, all related to network information

Most of these files look like text files so can be looked at using the cat utility, such as:

# cat /proc/cpuinfo

processor : 0

vendor_id : AuthenticAMD

cpu family : 15

model : 47

model name : AMD Athlon(tm) 64 Processor 3500+

stepping : 2

cpu MHz : 2202.909

…

Further, if you look inside /proc, you will notice quite a few numbered directories. These numbers correspond to running processes. Inside each directory are a number of files that give information regarding the process. For instance, /proc/1/ would contain information on process #1, which is typically init.

Some files in this directory are symlinks; the /proc/1/cwd symlink points to /, which indicates that init’s current working directory is /, the root directory. The /proc/1/exe symlink points to /sbin/init, the program that is running. The /proc/1/cmdline is a file containing the command-line used to execute the program. The /proc/1/status file indicates the status of the program, which can be used to determine if a program is sleeping or a zombie process, the amount of memory it’s using, the number of threads, the user/group privileges it is running as, and more.

To determine what files are in use by a process, look in the /proc/[pid]/fd/ directory. Each link in the directory will point to a file that is in use by the process in question.

There is a lot of information in /proc that can be found by those willing to look. A number of front-ends exist to help parse the information — tools like ps, top, and free, among many others provide more human-readable information, but to really find out what a program is doing, the authoritative resource is the /proc directory.

Linux/Unix, shell

Post navigation

Previous Post: process id based files and processes
Next Post: find_err.sql for finding errors from dba_errors.

Related Posts

  • Looping for remote servers and find its database from oratab file. Linux/Unix
  • tar and untar a dolder with all its subfolder. Linux/Unix
  • Paste command syntax Linux/Unix
  • move_arch_files.ksh Linux/Unix
  • secure crt settings Linux/Unix
  • kill all processes from specific user in solaris. Linux/Unix

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • Oracle (392)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • load SPM baseline from cursor cache05-Jun-2025
  • Drop all SPM baselines for SQL handle05-Jun-2025
  • Load SPM baseline from AWR05-Jun-2025
  • Drop specific SQL plan baseline – spm05-Jun-2025
  • findinfo.sql (SQL for getting CPU and Active session info)27-May-2025
  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Useful Solaris Commands on 28-SEP-2005 Linux/Unix
  • Jai Shree Ram Linux/Unix
  • Changing unix system clock when Oracle database is running. Oracle
  • This is from Temi Oracle
  • PLSQL Table Syntax 2 Oracle
  • Reclaim temp tablespace for oracle 8, 8i Oracle
  • copying/removing directory with all its subdirectory Linux/Unix
  • Move WordPress site from one hosting service to other. PHP/MYSQL/Wordpress

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme