So open() /proc/modules gives a file descriptor 3, so you just look for lines whose file descriptors are 3 and you can then trace the system calls involved. Here you see that apparently the lsmod program tries to read() from the open()ed file descriptor in 1024-byte chunks until EOF is reached, and finally close() it.
If you know of a program which reads /proc in a similar fashion you can try to strace it to find out what is involved.
HI,
I'm trying to get this right, please can you help. In my unix korn shell script, I call an oracle stored proc within a package and I specify 3 parameters, 2 of which are IN OUT parameters (i.e. I expect the stored proc to change them and return them back to me).
Does the unix code... (7 Replies)
Hi,
I would like to know how to call a program "cmp_size" ... where to put in progam to run it
ex: program checkdisk is below, and it will call a nother problem "cmp_size"
Do I just put the cmp_size program at the end of this program.
Thank you very much,
# check all directory for size... (3 Replies)
Hi,
I'm porting some old C++ code (that I didn't write) from Linux to AIX and have run into a problem in getting the process name from within the code when it is run on AIX. Basically the code is getting the process name so it can then return it to the rest of the code as argv. This code is trying... (1 Reply)
hi,
i need to compile a proc program, say prog.pc
can we compile this program in the unix environment? does this need a make file? can anyone help me on this since i am new to this area.
Thanks in advance. (1 Reply)
Hello
I am writing a script that will first execute ps to get the list of processes running, and the go into the /proc folder for each PID listed and gather relevant information.
I looked through the contents of a particular process in the /proc folder and I can't find where I can locate... (2 Replies)
Hi Team,
I am very new to this forum and hope someone will help me in resolving the issue.
I am new to Pro C also.
I made some changes to the existing Pro C program and want to run the program with the changes.
But I am unable to neither compile nor run the program.
Please do the... (2 Replies)
Hi, I am new to shell scripting and Sybase database i need a help that i try to execute a SYBASE stored procedure from a Unix shell script and wanna write the output of the SP into a Text File.somehow i try to find a solution but whwn i try to run the script i am not getting the output file with... (1 Reply)
Discussion started by: Arun619
1 Replies
LEARN ABOUT CENTOS
lsdev
LSDEV(8) Linux System Manual LSDEV(8)NAME
lsdev - display information about installed hardware
SYNOPSIS
lsdev
DESCRIPTION
lsdev gathers information about your computer's installed hardware from the interrupts, ioports and dma files in the /proc directory, thus
giving you a quick overview of which hardware uses what I/O addresses and what IRQ and DMA channels.
OPTIONS
None.
FILES
/proc/interrupts
IRQ channels.
/proc/ioports
I/O memory addresses.
/proc/dma
DMA channels.
BUGS
lsdev can't always figure out which lines in the three examined files refer to one and the same device, because these files sometimes use
different names for the same piece of hardware. For example, in some kernels the keyboard is referred to as `kbd' in /proc/ioports and as
`keyboard' in /proc/interrupts. This should be fixed in the kernel, not in lsdev (as has indeed happened for this particular example).
The program does however try to match lines by stripping anything after a space or open parenthesis from the name, so that e.g. the
`serial' lines from /proc/interrupts match the `serial(set)' lines from /proc/ioports. This attempt at DWIM might be considered a bug in
itself.
This program only shows the kernel's idea of what hardware is present, not what's actually physically available.
SEE ALSO procinfo(8).
AUTHOR
Sander van Malssen <svm@kozmix.cistron.nl>
3rd Release 1998-05-31 LSDEV(8)