40
Chapter 2. The
proc
File System
So, for example, a system with a USB bus but no USB devices connected to it has a
/proc/bus/usb/
directory containing several files:
total 0
dr xr xr x
1 root
root
0 May
3 16:25 001
 r  r  r  
1 root
root
0 May
3 16:25 devices
 r  r  r  
1 root
root
0 May
3 16:25 drivers
The
/proc/bus/usb/
directory contains files that track the various devices on any USB buses, as
well as the drivers required to use them. The
/proc/bus/usb/001/
directory contains all devices
on the first USB bus. By looking at the contents of the
devices
file, you can identify the USB root
hub on the motherboard:
T:
Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=
1 Spd=12
MxCh= 2
B:
Alloc=
0/900 us ( 0%), #Int=
0, #Iso=
0
D:
Ver= 1.00 Cls=09(hub
) Sub=00 Prot=00 MxPS= 8 #Cfgs=
1
P:
Vendor=0000 ProdID=0000 Rev= 0.00
S:
Product=USB UHCI Root Hub
S:
SerialNumber=d400
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=
0mA
I:
If#= 0 Alt= 0 #EPs= 1 Cls=09(hub
) Sub=00 Prot=00 Driver=hub
E:
Ad=81(I) Atr=03(Int.) MxPS=
8 Ivl=255ms
2.3.3.
/proc/driver/
This directory contains information for specific drivers in use by the kernel.
A common file found here is
rtc
, which provides output from the driver for the system's Real Time
Clock (RTC), the device that keeps the time while the system is switched off. Sample output from
/proc/driver/rtc
looks like this:
rtc_time : 01:38:43
rtc_date : 1998 02 13
rtc_epoch : 1900
alarm
: 00:00:00
DST_enable : no
BCD
: yes
24hr
: yes
square_wave : no
alarm_IRQ : no
update_IRQ : no
periodic_IRQ : no
periodic_freq : 1024
batt_status : okay
For more information about the RTC, review
/usr/src/linux 2.4/Documentation/rtc.txt
.
2.3.4.
/proc/fs
This directory shows which file systems are exported. If you are running an NFS server, you can type
cat /proc/fs/nfs/exports
to view the file systems being shared and the permissions granted for
the those file systems. For more on sharing filesystem with NFS, see Chapter 17.






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

tomcat hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved