- 浏览: 235375 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
hnraysir:
必须登录评论下,谢谢。by elesos.com
分库和分表 -
化蝶自在飞:
命运使然.前生来世都注定了的.
贫穷是罪恶之源 -
Kidwind:
出现这样的错误ViewDoesNotExist at /con ...
django的jsCalendar的widget -
hanyh:
我的项目比较小,就直接写在views.py里面了。你出现的是什 ...
django的jsCalendar的widget -
Kidwind:
请问JsCalendarWidget应该放在哪个位置,我的是放 ...
django的jsCalendar的widget
1,The Proc psuedo file system is a real time, memory resident file system that tracks the processes running on your machine and the state of your system.
2, certain parts of the /proc file system can be read only by the owner of the process and of course root.
3,Dmesg helps us determine the devices that have been detected and
initialized by the Linux kernel.
4,Using the /proc/sys file system to parse kernel parameters.
example:
/proc/sys/net/ipv4/ip_forward
The above file ip_forward has a default value of "0" which you can see
when you cat the contents of this file. This means that IP forwarding by
this machine isn't allowed by the kernel. But this configuration can be
changed in real time by just changing the value stored in this file from
"0" to "1". Thus we have enabled IP forwarding on our Linux machine.
5,The numerical named directories
The various directories that you see out here are the processes that were
running on our machine at the instant we took a snapshot of the /proc
file system. Let's look at the contents of one of these directories.
"cmdline", this file contains the whole command line used to invoke the
process. The contents of this file are the command line arguments with all
the parameters that one has passed to start the particular process.
"cwd", as is visible from above this is a symbolic link to the current
working directory of that particular process.
"environ" contains all the environment variables defined for this
particular process in the form VARIABLE=value. As with cmdline, all the
information contained in the file is without any formatting or space
between the command line arguments and various arguments.
root@hanyh-sina:/proc/2877# more environ
USER=hanyh41c5b114a3f1aad-1254014503.431125-1889403626berra-gtk-module=dd2e39cbab07170eb6e6866a4abebe28ODULE=scim-bridgeysql/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
SH_AUTH_SOCK=/tmp/ssh-IBCbuc2877/agent.2877MODULE=ximgdm/
"exe", this is a symbolic link to the executable file that the current
process is linkroot@hanyh-sina:/proc/2877# ls -l exe
lrwxrwxrwx 1 hanyh hanyh 0 2009-09-27 09:21 exe -> /usr/bin/gnome-session
ed to.
"fd", this directory contains the list file descriptors as opened by the
particular process.
lr-x------ 1 hanyh hanyh 64 2009-09-27 09:21 0 -> /dev/null
l-wx------ 1 hanyh hanyh 64 2009-09-27 09:21 1 -> pipe:[7760]
lr-x------ 1 hanyh hanyh 64 2009-09-27 10:01 10 -> pipe:[8622]
lrwx------ 1 hanyh hanyh 64 2009-09-27 10:01 16 -> socket:[8625]
lrwx------ 1 hanyh hanyh 64 2009-09-27 10:01 17 -> socket:[8627]
pr--r--r-- 1 root root 0 Nov 30 12:20 maps
root@hanyh-sina:/proc/2877# more maps
00400000-00436000 r-xp 00000000 08:08 50659720 /usr/bin/gnome-session
00635000-00636000 r--p 00035000 08:08 50659720 /usr/bin/gnome-session
00636000-00638000 rw-p 00036000 08:08 50659720 /usr/bin/gnome-session
01721000-01840000 rw-p 01721000 00:00 0 [heap]
7f4f046f8000-7f4f0471a000 r-xp 00000000 08:08 236876 /usr/lib/gtk-2.0/2.10.0/eng
ines/libmurrine.so
7f4f0471a000-7f4f04919000 ---p 00022000 08:08 236876 /usr/lib/gtk-2.0/2.10.0/eng
parts of the process' address space which are currently mapped to a file.
The fields, from left to right, are: the address space associated to this
mapping, the permissions associated to this mapping, the offset from the
beginning of the file where the mapping starts, the device on which the
mapped file is located, the inode number of the file and finally, the name
of the file itself.
"root", this is a symbolic link pointing to the directory which is the
root file system for the particular process.
"status", this file gives information regarding the name of the process,
its current status, i.e sleeping or awake, its PID, its UID, its PPID and
a lot of other general information. This information can be viewed in a
simpler and structured manner by using tools like, "ps" and "top".
proc/cpuinfo
Information about the processor, such as its type, make, model, and
performance.
/proc/devices
List of device drivers configured into the currently running kernel.
/proc/dma
Shows which DMA channels are being used at the moment.
/proc/filesystems
Filesystems configured into the kernel.
/proc/interrupts
Shows which interrupts are in use, and how many of each there have been.
/proc/ioports
Which I/O ports are in use at the moment.
2, certain parts of the /proc file system can be read only by the owner of the process and of course root.
3,Dmesg helps us determine the devices that have been detected and
initialized by the Linux kernel.
4,Using the /proc/sys file system to parse kernel parameters.
example:
/proc/sys/net/ipv4/ip_forward
The above file ip_forward has a default value of "0" which you can see
when you cat the contents of this file. This means that IP forwarding by
this machine isn't allowed by the kernel. But this configuration can be
changed in real time by just changing the value stored in this file from
"0" to "1". Thus we have enabled IP forwarding on our Linux machine.
5,The numerical named directories
The various directories that you see out here are the processes that were
running on our machine at the instant we took a snapshot of the /proc
file system. Let's look at the contents of one of these directories.
"cmdline", this file contains the whole command line used to invoke the
process. The contents of this file are the command line arguments with all
the parameters that one has passed to start the particular process.
"cwd", as is visible from above this is a symbolic link to the current
working directory of that particular process.
"environ" contains all the environment variables defined for this
particular process in the form VARIABLE=value. As with cmdline, all the
information contained in the file is without any formatting or space
between the command line arguments and various arguments.
root@hanyh-sina:/proc/2877# more environ
USER=hanyh41c5b114a3f1aad-1254014503.431125-1889403626berra-gtk-module=dd2e39cbab07170eb6e6866a4abebe28ODULE=scim-bridgeysql/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
SH_AUTH_SOCK=/tmp/ssh-IBCbuc2877/agent.2877MODULE=ximgdm/
"exe", this is a symbolic link to the executable file that the current
process is linkroot@hanyh-sina:/proc/2877# ls -l exe
lrwxrwxrwx 1 hanyh hanyh 0 2009-09-27 09:21 exe -> /usr/bin/gnome-session
ed to.
"fd", this directory contains the list file descriptors as opened by the
particular process.
lr-x------ 1 hanyh hanyh 64 2009-09-27 09:21 0 -> /dev/null
l-wx------ 1 hanyh hanyh 64 2009-09-27 09:21 1 -> pipe:[7760]
lr-x------ 1 hanyh hanyh 64 2009-09-27 10:01 10 -> pipe:[8622]
lrwx------ 1 hanyh hanyh 64 2009-09-27 10:01 16 -> socket:[8625]
lrwx------ 1 hanyh hanyh 64 2009-09-27 10:01 17 -> socket:[8627]
pr--r--r-- 1 root root 0 Nov 30 12:20 maps
root@hanyh-sina:/proc/2877# more maps
00400000-00436000 r-xp 00000000 08:08 50659720 /usr/bin/gnome-session
00635000-00636000 r--p 00035000 08:08 50659720 /usr/bin/gnome-session
00636000-00638000 rw-p 00036000 08:08 50659720 /usr/bin/gnome-session
01721000-01840000 rw-p 01721000 00:00 0 [heap]
7f4f046f8000-7f4f0471a000 r-xp 00000000 08:08 236876 /usr/lib/gtk-2.0/2.10.0/eng
ines/libmurrine.so
7f4f0471a000-7f4f04919000 ---p 00022000 08:08 236876 /usr/lib/gtk-2.0/2.10.0/eng
parts of the process' address space which are currently mapped to a file.
The fields, from left to right, are: the address space associated to this
mapping, the permissions associated to this mapping, the offset from the
beginning of the file where the mapping starts, the device on which the
mapped file is located, the inode number of the file and finally, the name
of the file itself.
"root", this is a symbolic link pointing to the directory which is the
root file system for the particular process.
"status", this file gives information regarding the name of the process,
its current status, i.e sleeping or awake, its PID, its UID, its PPID and
a lot of other general information. This information can be viewed in a
simpler and structured manner by using tools like, "ps" and "top".
proc/cpuinfo
Information about the processor, such as its type, make, model, and
performance.
/proc/devices
List of device drivers configured into the currently running kernel.
/proc/dma
Shows which DMA channels are being used at the moment.
/proc/filesystems
Filesystems configured into the kernel.
/proc/interrupts
Shows which interrupts are in use, and how many of each there have been.
/proc/ioports
Which I/O ports are in use at the moment.
发表评论
-
设计的解耦合
2010-10-26 15:37 1240一个项目要接收大量上传文件,简单的分为3层: 1,前端(Act ... -
RRD使用入门(一)
2010-10-21 14:08 0一个项目上线,要统计流量等数据。计划直接使用rrd来做. 一, ... -
在不真正了解一门东西前不要乱用
2010-02-04 10:12 938比如说nginx,如果没有真正去认真读完相关文档,认真的去测试 ... -
find使用例子
2010-01-12 18:33 1233http://johnmeister.com/CS/UNIX/ ... -
spinlock
2009-12-05 15:23 833spinlock is a lock where the th ... -
volatile busy wating
2009-12-05 15:14 756consequently C++, the keyword w ... -
source code
2009-12-05 14:01 778_LARGEFILE64_SOURCE #define _GN ... -
C保留字
2009-12-05 13:49 898原来只认为是基本的函数,库名字,今天看libc manual发 ... -
syslog-ng reload导致named pipe不可用
2009-12-02 10:28 0ssssssssssss -
shell 递归调用自己
2009-11-20 11:46 1033#!/bin/sh if test "$2&q ... -
ubuntu上使用gitweb
2009-11-06 10:36 2281step 1: apt-get install git ... -
第一次用git 和手册
2009-11-02 10:46 3096一,git clone git@xxx.xxx.xx:quar ... -
编译apache模块
2009-10-22 14:58 930以前编译安装的时候忘记了mod_rewrite hanyh@h ... -
security linux
2009-10-21 22:27 761Boot security ================= ... -
每个成熟的C语言软件都有自己的扩展库
2009-10-21 15:30 948无论apache,mysql,php都针对具体的需求,拥有自己 ... -
最大目录深度
2009-10-14 11:20 954#!/bin/sh count=0 while t ... -
write your own "who"
2009-10-12 17:59 854warning: incompatible implicit ... -
玩具程序和真实程序
2009-10-12 14:23 890一个简单的more程序实现代码不到100行 看linux下mo ... -
一个分布式框架高性能消息服务框架
2009-10-11 22:20 745http://www.spread.org/ 有时间可以研究 ... -
ext2/ext3 32000限制
2009-09-27 16:20 1642为什么有32000限制? ext2/ext3有此限制,xfs无 ...
相关推荐
在Linux操作系统中,/proc文件系统是一个非常重要的虚拟文件系统,它提供了查看和修改内核运行时状态的接口。...通过学习和实践这种技术,不仅可以提升对Linux操作系统的理解,还能增强GUI程序设计的能力。
在本实验中,我们学习了 /proc 文件系统的基础知识,并使用 GTK 图形库来读取 /proc 文件系统,并将系统状态以图形化的形式显示出来。本实验可以帮助我们更好地理解 Linux 系统的工作原理,并提高我们的编程能力。
本学习资料包"proc学习资料,包含所有知识点程序"显然专注于这一领域,旨在帮助学习者深入理解和应用`/proc`。 首先,让我们了解一下`/proc`的基本结构。`/proc`目录下通常包含许多子目录和文件,每一个都对应着...
以下是对`/proc`学习的一些关键知识点: 1. **进程信息**: `/proc`目录下的数字文件(如`/proc/1`, `/proc/2`等)代表了系统中的各个进程。通过读取这些文件,我们可以获取进程ID(PID)、状态、命令行参数、环境...
本篇文章将围绕"PROC学习文档"这一主题,深入探讨PROC文件系统及其相关知识。 首先,PROC文件系统不是一个实际存储数据的地方,而是内核与用户空间交互的一个接口,用于获取和修改内核的状态。它的主要目录和文件...
通过学习这个编程手册,你将能够编写程序来读取这些`/proc`文件,从而获取和分析系统数据。例如,你可以创建一个监控工具来检查内存使用率、CPU负载或网络带宽使用情况。同时,`/proc`也常用于调试目的,帮助开发者...
在学习`/proc`程序设计时,理解Linux内核如何通过`/proc`接口暴露信息至关重要。同时,熟悉常见的`/proc`文件及其内容结构,可以帮助开发者编写出能够获取和分析系统状态的有效工具。 本教程的"proc程序设计_正文....
`proc_test`可能是一个针对`/proc`目录进行测试或探索的实践操作,或者是一个用于学习`/proc`的教程材料。在这个场景下,我们将深入探讨`/proc`目录及其在Linux运维和服务器管理中的作用。 首先,`/proc`目录是...
对于初学者来说,理解Proc文件系统的结构和功能,是学习Linux系统管理及内核编程的基础。通过探索Proc目录下的不同文件和目录,可以获取丰富的系统运行数据,这对于监控、调试和优化系统至关重要。
学习和理解`/proc`文件系统对于Linux系统编程至关重要,它可以用于获取系统信息、调试内核问题、监控系统性能,甚至修改某些内核参数。通过分析和实践"2_proc.tar.gz"中的示例代码,开发者可以更深入地了解这一机制...
9. 学习技术的重要性:学习技术是非常重要的,需要不断地学习和实践新的技术和技能。 10. 源代码的分析:通过分析源代码,可以学习到许多有用的技术和技能,并且可以获得更好的理解和应用。 11. 软件设计的重要性...
通过深入学习和实践,学生可以更全面地理解Linux内核的工作原理,以及如何利用proc文件系统来监控和调整系统状态,这对于操作系统的学习和系统管理员的工作都是非常有价值的。在进行课程设计时,建议仔细研究`/proc`...
对于初学者来说,参考文档、手册页以及开源代码是学习`/proc`驱动开发的好途径。 综上所述,`/proc`设备驱动程序的开发是嵌入式Linux系统开发中的一个重要环节,它为用户提供了一种灵活的手段来获取和修改内核信息...
Linux中断是操作系统与硬件交互的关键机制,特别是在处理设备事件和服务请求时。...理解中断和异常的概念、硬件支持以及它们在Linux内核中的实现,对于任何深入学习和操作Linux系统的人来说都是至关重要的。
ProC/C++学习指南 Pro*C/C++是Oracle公司推出的一个强大的开发工具,它允许开发者在C/C++代码中直接嵌入SQL语句,从而实现了高效的数据库交互。下面是对Pro*C/C++的详细介绍。 一、Pro*C/C++简介 Pro*C/C++是一种...
【操作系统课程实验报告-实验二 观察Linux的行为】 本次实验主要目的是深入理解Linux操作系统,特别是通过探索Linux的proc文件系统来...此外,对proc文件系统的深入理解有助于进一步学习和研究Linux内核的工作原理。
【Linux proc 文件系统详解】 ...通过以上学习,你不仅能够理解Linux proc文件系统并查询CPU、内核版本等信息,还能熟练进行C程序的编辑、编译、运行以及使用GDB进行调试,这些都是Linux系统管理和软件开发的基础技能。
通过研究和理解netrate源码,开发者可以学习如何在嵌入式系统中实现自定义的网络监控解决方案,这对于设备优化、故障排查以及性能测试等工作具有很高的价值。同时,这也是提升C语言编程技巧和深入理解Linux内核工作...
通过对`/proc`目录下的文件和目录的学习,用户可以更深入地了解系统的内部运作,并能够更加有效地管理和优化系统性能。无论是初学者还是经验丰富的系统管理员,掌握`procfs`的使用方法都是非常有益的。
在Linux操作系统中,`/proc`文件系统是一个虚拟...通过这段代码,我们可以学习到如何利用内核模块扩展系统功能,以及如何在用户态和内核态之间交换信息。这对于软件开发人员来说,是理解和定制Linux系统的重要知识。