<> 문제... 언젠간 고쳐지겠지만 당분간은 "<"를 써주시면 됩니다. 혹은 <code> 태그를 사용해 주셔도 됩니다. cinsk님의 "KLDP(drupal)에 글 쓸 때, 프로그램 소스 붙이기."글에 코드 입력에 대한 좋은 내용들이 있습니다.
----
$PWD `date`
Each process subdirectory has the entries listed below in the form /proc/PID/:
Files:
cmdline: Command line arguments
environ: Values of environment variables
mem: Memory held by this process
stat: Process Status
status: Process status in human readable form
maps: Memory maps
statm: Process memory status information
mounts: Mounted filesystems
Links:
cwd: Link to the current working directory
exe: Link to the executable of this process
root: Link to the root directory of this process
Directories:
fd: Contains all file descriptors
If you check the file "status" by issuing the command "cat /proc/[PID]/status" you should see something like:
Example:
$ cat /proc/self/status
This will show you nearly the same information you would get if you viewed it with the ps command. In fact, ps uses the proc file system to obtain its information.
Example:
$ cat /proc/self/statm
91 91 76 4 0 87 15
$
The "statm" file contains more detailed information about the process memory usage. Its seven fields are explained below:
size total program size.
resident size of memory portions.
shared number of pages that are shared.
trs number of pages that are 'code'.
drs number of pages of data/stack.
lrs number of pages of library.
dt number of dirty pages.
getpid
getpid
#include pid_t
#include
pid_t getpid(void);
pid_t getppid(void);
^^
#include pid_t
#include
pid_t getpid(void);
pid_t getppid(void);
^^
#include pid_t
#include < unistd.h >
pid_t getpid(void);
pid_t getppid(void);
^^
#include ( unistd.h ) pid_t
#include ( unistd.h )
pid_t getpid(void);
pid_t getppid(void);
* 꺽쇠를 입력하면 화면에 안나와서.. ( ) 가로로 대신함..
^^
<> 문제... 언젠간
<> 문제... 언젠간 고쳐지겠지만 당분간은 "<"를 써주시면 됩니다. 혹은 <code> 태그를 사용해 주셔도 됩니다. cinsk님의 "KLDP(drupal)에 글 쓸 때, 프로그램 소스 붙이기."글에 코드 입력에 대한 좋은 내용들이 있습니다.
----
$PWD `date`
$PWD `date`
Numeric Directories
Numeric Directories (Processes' PID Directories):
Each process subdirectory has the entries listed below in the form /proc/PID/:
Files:
cmdline: Command line arguments
environ: Values of environment variables
mem: Memory held by this process
stat: Process Status
status: Process status in human readable form
maps: Memory maps
statm: Process memory status information
mounts: Mounted filesystems
Links:
cwd: Link to the current working directory
exe: Link to the executable of this process
root: Link to the root directory of this process
Directories:
fd: Contains all file descriptors
If you check the file "status" by issuing the command "cat /proc/[PID]/status" you should see something like:
Example:
$ cat /proc/self/status
This will show you nearly the same information you would get if you viewed it with the ps command. In fact, ps uses the proc file system to obtain its information.
Example:
$ cat /proc/self/statm
91 91 76 4 0 87 15
$
The "statm" file contains more detailed information about the process memory usage. Its seven fields are explained below:
size total program size.
resident size of memory portions.
shared number of pages that are shared.
trs number of pages that are 'code'.
drs number of pages of data/stack.
lrs number of pages of library.
dt number of dirty pages.
* 출처: http://www.linux-me.org/index.php?option=articles&task=viewarticle&artid=21&Itemid=3
^^
댓글 달기