Proc/0/cwd/proc/0/cwd/proc/0/cwd

Message boards : Number crunching : Proc/0/cwd/proc/0/cwd/proc/0/cwd
Message board moderation

To post messages, you must log in.

AuthorMessage
Profile Kleineschay2

Send message
Joined: 14 Aug 99
Posts: 97
Credit: 23,218,261
RAC: 0
Thailand
Message 845835 - Posted: 28 Dec 2008, 2:26:43 UTC

My Sun Ultra 60 that I ONLY use for Seti has this massive directory structure of proc/0/cwd/... that goes on forever. What is this? How do I delete it? the normal unix commands didn't work. This computer is ONLY used for SETI yet it has about 5 million files on it. I need to fix this. Any help would be great.
Thanks,
-Michael

ID: 845835 · Report as offensive
Profile tullio
Volunteer tester

Send message
Joined: 9 Apr 04
Posts: 8797
Credit: 2,930,782
RAC: 1
Italy
Message 845855 - Posted: 28 Dec 2008, 4:03:56 UTC - in response to Message 845835.  

My Sun Ultra 60 that I ONLY use for Seti has this massive directory structure of proc/0/cwd/... that goes on forever. What is this? How do I delete it? the normal unix commands didn't work. This computer is ONLY used for SETI yet it has about 5 million files on it. I need to fix this. Any help would be great.
Thanks,
-Michael

Which is your OS?
ID: 845855 · Report as offensive
Profile Kleineschay2

Send message
Joined: 14 Aug 99
Posts: 97
Credit: 23,218,261
RAC: 0
Thailand
Message 846082 - Posted: 28 Dec 2008, 18:48:09 UTC - in response to Message 845855.  


Which is your OS?[/quote]

SunOS 5.10
Thanks!!

ID: 846082 · Report as offensive
S@NL - John van Gorsel
Volunteer tester
Avatar

Send message
Joined: 5 Jul 99
Posts: 193
Credit: 139,673,078
RAC: 0
Netherlands
Message 846192 - Posted: 28 Dec 2008, 23:53:34 UTC

Isn't that common on Unix type systems? I checked one of my Linux pc's and it has the same. The /proc directory contains well over 28000 virtual files (size is zero) and the file system reports 250TB(!) as the size of /proc directory.


Seti@Netherlands website
ID: 846192 · Report as offensive
Profile AlphaLaser
Volunteer tester

Send message
Joined: 6 Jul 03
Posts: 262
Credit: 4,430,487
RAC: 0
United States
Message 846212 - Posted: 29 Dec 2008, 1:31:51 UTC

/proc doesn't contain real files on disk, only information about the system and running processes. It's a meta-filesystem just like /dev/null, /dev/random, etc. Nothing in /proc actually takes up disk space, and you can read more about its purpose and contents at procfs.

/proc/0/cwd returns the current working directory of the process with PID 0, thus if the working directory is root, then /proc/0/cwd is just an alias for /, and you can recursively do this for as many levels as you want.
ID: 846212 · Report as offensive
Profile Paul D. Buck
Volunteer tester

Send message
Joined: 19 Jul 00
Posts: 3898
Credit: 1,158,042
RAC: 0
United States
Message 846240 - Posted: 29 Dec 2008, 3:36:13 UTC - in response to Message 846212.  

/proc doesn't contain real files on disk, only information about the system and running processes. It's a meta-filesystem just like /dev/null, /dev/random, etc. Nothing in /proc actually takes up disk space, and you can read more about its purpose and contents at procfs.

/proc/0/cwd returns the current working directory of the process with PID 0, thus if the working directory is root, then /proc/0/cwd is just an alias for /, and you can recursively do this for as many levels as you want.


Well, this explains why you cannot delete it ... :)

Delete this tree and you delete the system! :)

Well, sort of ...
ID: 846240 · Report as offensive
Profile Kleineschay2

Send message
Joined: 14 Aug 99
Posts: 97
Credit: 23,218,261
RAC: 0
Thailand
Message 846253 - Posted: 29 Dec 2008, 4:15:32 UTC - in response to Message 846212.  

/proc doesn't contain real files on disk, only information about the system and running processes. It's a meta-filesystem just like /dev/null, /dev/random, etc. Nothing in /proc actually takes up disk space, and you can read more about its purpose and contents at procfs.

/proc/0/cwd returns the current working directory of the process with PID 0, thus if the working directory is root, then /proc/0/cwd is just an alias for /, and you can recursively do this for as many levels as you want.


I started mine counting the files and the bargraph is at about 1/5th and it is up to 5 MILLION files under the proc directory so far.
ID: 846253 · Report as offensive
Cosmic_Ocean
Avatar

Send message
Joined: 23 Dec 00
Posts: 3027
Credit: 13,516,867
RAC: 13
United States
Message 846278 - Posted: 29 Dec 2008, 7:19:04 UTC

My understanding of the /proc directory on *NIX systems is that it's basically an imaginary virtual file system. It occupies a small amount of RAM and that's about it. Mostly it's just a way of organizing the resources for all the running processes. Say for example PID 6342 needs 5 files to be in RAM. There's a PID direcotry in /proc for PID 6342, and the contents of that directory are those 5 files and control information for the process itself.

/proc gets created as one of the very very first steps (I think right after PID 1 (init) gets started, /proc gets created. init is the first process to start, and the last one to shut down. On openSuSE, when shutting down, if I hit escape to get out of the splash screen and see what steps are being taken, just before "halting system", there is "unmounting profs".

My experience is that you can't really do much with /proc, and it doesn't really take up any space either on disk, or RAM, so in a nutshell, just forget about it. It's there for a reason, and there's a reason why only 'root' can make modifications to it.
Linux laptop:
record uptime: 1511d 20h 19m (ended due to the power brick giving-up)
ID: 846278 · Report as offensive
Profile Kleineschay2

Send message
Joined: 14 Aug 99
Posts: 97
Credit: 23,218,261
RAC: 0
Thailand
Message 846760 - Posted: 30 Dec 2008, 5:11:53 UTC - in response to Message 846278.  

My understanding of the /proc directory on *NIX systems is that it's basically an imaginary virtual file system. It occupies a small amount of RAM and that's about it. Mostly it's just a way of organizing the resources for all the running processes. Say for example PID 6342 needs 5 files to be in RAM. There's a PID direcotry in /proc for PID 6342, and the contents of that directory are those 5 files and control information for the process itself.

/proc gets created as one of the very very first steps (I think right after PID 1 (init) gets started, /proc gets created. init is the first process to start, and the last one to shut down. On openSuSE, when shutting down, if I hit escape to get out of the splash screen and see what steps are being taken, just before "halting system", there is "unmounting profs".

My experience is that you can't really do much with /proc, and it doesn't really take up any space either on disk, or RAM, so in a nutshell, just forget about it. It's there for a reason, and there's a reason why only 'root' can make modifications to it.


In the file viewer, I did a right click and properties and mine reads 2.4 GB.
I have a small drive (that I guess I need to replace) so 2.4 GB is a lot to my system. I guess the next question is how hard is it to replace a drive under Unix? I have software that I could use to clone the drive to a larger drive, but something tells me Unix will catch me on that one.



ID: 846760 · Report as offensive
Cosmic_Ocean
Avatar

Send message
Joined: 23 Dec 00
Posts: 3027
Credit: 13,516,867
RAC: 13
United States
Message 846852 - Posted: 30 Dec 2008, 13:13:15 UTC - in response to Message 846760.  

My understanding of the /proc directory on *NIX systems is that it's basically an imaginary virtual file system. It occupies a small amount of RAM and that's about it. Mostly it's just a way of organizing the resources for all the running processes. Say for example PID 6342 needs 5 files to be in RAM. There's a PID direcotry in /proc for PID 6342, and the contents of that directory are those 5 files and control information for the process itself.

/proc gets created as one of the very very first steps (I think right after PID 1 (init) gets started, /proc gets created. init is the first process to start, and the last one to shut down. On openSuSE, when shutting down, if I hit escape to get out of the splash screen and see what steps are being taken, just before "halting system", there is "unmounting profs".

My experience is that you can't really do much with /proc, and it doesn't really take up any space either on disk, or RAM, so in a nutshell, just forget about it. It's there for a reason, and there's a reason why only 'root' can make modifications to it.


In the file viewer, I did a right click and properties and mine reads 2.4 GB.
I have a small drive (that I guess I need to replace) so 2.4 GB is a lot to my system. I guess the next question is how hard is it to replace a drive under Unix? I have software that I could use to clone the drive to a larger drive, but something tells me Unix will catch me on that one.



As far as I know, the 2.4GB size that you got is kind of fictional. Some of it is symbolic/hard links to real files (which may get stuck in in some limited looping) and some of it is the actual data that running processes are using in RAM.

As far as replacing the main disc with a larger one, it should be really simple.

If your new disc is installed, you can get started right away, otherwise, shut down, put the new disc in, and boot back up.

From here, this is really easy. As root, do
dd if=/dev/hda of=/dev/hdb bs=512

This will do a bit-level copy from your root disc (assuming your root disc is the primary master IDE disc). If unsure of the designation of the hardware, usually a simple command of 'mount' or 'df' will give you the information you need.

Now you should be able to shut down, swap the discs so that your new one takes the place of /dev/hda, boot up, and the system won't be any the wiser. I have actually done this several times before. Depending on your partition layout on the disc, you will end up with unused space which can then be utilized by making new partitions, or extending the last one to use all of the space.
Linux laptop:
record uptime: 1511d 20h 19m (ended due to the power brick giving-up)
ID: 846852 · Report as offensive
Profile ML1
Volunteer moderator
Volunteer tester

Send message
Joined: 25 Nov 01
Posts: 20147
Credit: 7,508,002
RAC: 20
United Kingdom
Message 846901 - Posted: 30 Dec 2008, 15:29:52 UTC - in response to Message 846852.  

My understanding of the /proc directory on *NIX systems is that it's basically an imaginary virtual file system. ... It's there for a reason, and there's a reason why only 'root' can make modifications to it.

Everything on *nix is part of a filesystem and procfs is a view into the running kernel. It can be called a 'virtual' filesystem in that it doesn't really exist. It is just a "viewing portal" that 'looks like' a filesystem so that standard filesystem programs can be used to interrogate and manipulate kernel parameters. In "Windows-speak" you might call it a "live kernel registry".

Lots of system utilities make use of "/proc". There is also "/system"...

No physical disk space is utilised by either of them (apart from perhaps RAM swap space). Trying to get a file size for them is pretty much meaningless.


As far as replacing the main disc with a larger one, it should be really simple.

If your new disc is installed, you can get started right away, otherwise, shut down, put the new disc in, and boot back up.

From here, this is really easy. As root, do
dd if=/dev/hda of=/dev/hdb bs=512

This will do a bit-level copy from your root disc (assuming your root disc is the primary master IDE disc). If unsure of the designation of the hardware, usually a simple command of 'mount' or 'df' will give you the information you need. ...

That's a good 'quick-n-dirty' way of doing it.

Two notes:

On recent systems, all HDDs are seen as /dev/sdX where "X" is a drive letter.

And if you are going to use "dd" then best is to shut down your system and reboot into a LiveCD so that the disk you are copying from is not being used.

Or you could just format the new disk and add a mount point for it to use it as-is, with your system still on the existing disk.

A good way to work so that you can easily upgrade is to have partitions for "/", swap, and "/home". Then you can reinstall a new system into "/" and leave you "/home" user data intact and ready for use with the new system.


Anyone at a local user group should be able to help you out.

Hope that helps,

Good luck,
Martin

See new freedom: Mageia Linux
Take a look for yourself: Linux Format
The Future is what We all make IT (GPLv3)
ID: 846901 · Report as offensive
Profile Kleineschay2

Send message
Joined: 14 Aug 99
Posts: 97
Credit: 23,218,261
RAC: 0
Thailand
Message 846957 - Posted: 30 Dec 2008, 23:05:09 UTC - in response to Message 846901.  

My understanding of the /proc directory on *NIX systems is that it's basically an imaginary virtual file system. ... It's there for a reason, and there's a reason why only 'root' can make modifications to it.

Everything on *nix is part of a filesystem and procfs is a view into the running kernel. It can be called a 'virtual' filesystem in that it doesn't really exist. It is just a "viewing portal" that 'looks like' a filesystem so that standard filesystem programs can be used to interrogate and manipulate kernel parameters. In "Windows-speak" you might call it a "live kernel registry".

Lots of system utilities make use of "/proc". There is also "/system"...

No physical disk space is utilised by either of them (apart from perhaps RAM swap space). Trying to get a file size for them is pretty much meaningless.


As far as replacing the main disc with a larger one, it should be really simple.

If your new disc is installed, you can get started right away, otherwise, shut down, put the new disc in, and boot back up.

From here, this is really easy. As root, do
dd if=/dev/hda of=/dev/hdb bs=512

This will do a bit-level copy from your root disc (assuming your root disc is the primary master IDE disc). If unsure of the designation of the hardware, usually a simple command of 'mount' or 'df' will give you the information you need. ...

That's a good 'quick-n-dirty' way of doing it.

Two notes:

On recent systems, all HDDs are seen as /dev/sdX where "X" is a drive letter.

And if you are going to use "dd" then best is to shut down your system and reboot into a LiveCD so that the disk you are copying from is not being used.

Or you could just format the new disk and add a mount point for it to use it as-is, with your system still on the existing disk.

A good way to work so that you can easily upgrade is to have partitions for "/", swap, and "/home". Then you can reinstall a new system into "/" and leave you "/home" user data intact and ready for use with the new system.


Anyone at a local user group should be able to help you out.

Hope that helps,

Good luck,
Martin



What about my idea of cloning the current drive and then dropping in the (larger) clone?


ID: 846957 · Report as offensive
Cosmic_Ocean
Avatar

Send message
Joined: 23 Dec 00
Posts: 3027
Credit: 13,516,867
RAC: 13
United States
Message 847037 - Posted: 31 Dec 2008, 3:07:20 UTC - in response to Message 846957.  

What about my idea of cloning the current drive and then dropping in the (larger) clone?

The 'dd' method I pointed out above would do the trick just fine, but I did forget to mention that it would go much smoother if you threw in a live-boot CD of some kind so that your current disc can be accessed as read-only.

I have actually done it while a disc was mounted 'rw', and did not have any adverse effects, aside from the clone not having info about the current changes/events that happened after the cloning completed.
Linux laptop:
record uptime: 1511d 20h 19m (ended due to the power brick giving-up)
ID: 847037 · Report as offensive
Profile Francis Noel
Avatar

Send message
Joined: 30 Aug 05
Posts: 452
Credit: 142,832,523
RAC: 94
Canada
Message 847109 - Posted: 31 Dec 2008, 6:08:09 UTC

Replacing a drive under UNIX can be pretty fun, and easy. Only catch is you have to know what you are doing.

I have had some success with the method Cosmic suggests under Linux. Moving a system using ext3 on a classic partition layout to a drive of the same type will work. Moving to a larger drives will be functional but GNU Parted will be needed to mend the partitions. I would not risk it. If the system is under LVM or some other means of management breakage will most surely ensue.

As far as UNIX goes I would NOT recommend doing it this way. Almost all commercial UNIXes use some form of volume manager to virtualize storage. Data disks might survive the dd treatment but I doubt a system disk would. There is more, much more, to UNIX proprietary systems than there is to PCs running Linux. Disk layouts ( thats DISK, not partitions ) are quit funky in those systems.

Sadly my knowledge of SunOS is very limited as my expertise is with HP-UX and AIX but I can maybe point you in the right direction.

First idea : Backup and restore.
All commercial UNIXes include disaster recovery utilities to backup the system to an external media ( tape, DVD, network share ). Backup the system, swap or add the disk, restore the system. This is the safest way as your original remains untouched and the system is made to be recovered that way in case of a disaster. Documentation and step-by-step procedures should be readily available.

Second idea : use the volume manager.
Use the system's volume manager to mirror the system volume group to a larger disk set, then break the mirror. Instruct the system to boot from the new disk set, reboot, remove old drives, enjoy. Again, procedures to do this should be available as this is standard sysadmin practices.

While we are touching on volume managers, why remove the old drive ? If it is still reliable just add new storage to the volume group and extend engorged filesystems as needed. This might be an easier approach to learn about storage management under UNIX.

Sorry I could not be more specific, I have yet to get my mitts on Sun hardware :).

additional hint : The Solaris Volume Manager Admin Guide
http://docs.sun.com/app/docs/doc/816-4520?l=fr&a=load

Let us know how it goes
mambo
ID: 847109 · Report as offensive
Profile Kleineschay2

Send message
Joined: 14 Aug 99
Posts: 97
Credit: 23,218,261
RAC: 0
Thailand
Message 860070 - Posted: 31 Jan 2009, 5:37:21 UTC

OK, this will sound silly to you UNIX people out there, but I live in the PC world. I have 500GB SATA and IDE drives all over the place, I never thought about the fact that the ULTRA 60 uses SCSI. I don't have any of those. So instead of replacing my drive, I added a second one and now I need to activate it (mount?) and move some of the stuff on the first drive to the second. Hopefully this is not too tuff in the UNIX world. I know it could never be as easy as the PC world. :)
For those of you who think this belongs elsewhere, my machine which is only a SETI cruncher, won't crunch because of lack of resources.

Thanks,
-Michael
ID: 860070 · Report as offensive
Profile Kleineschay2

Send message
Joined: 14 Aug 99
Posts: 97
Credit: 23,218,261
RAC: 0
Thailand
Message 860328 - Posted: 31 Jan 2009, 18:37:19 UTC - in response to Message 847109.  

I am looking at that manual, it keeps saying " From the Main Menu choose "view and edit Drives" " Main Menu of what? My Main Menu ('Launch' which says 'Main Menu' when you mouse over it) Doesn't have a 'view and edit drives.'
Thanks,
-Michael
ID: 860328 · Report as offensive
Profile Kleineschay2

Send message
Joined: 14 Aug 99
Posts: 97
Credit: 23,218,261
RAC: 0
Thailand
Message 860348 - Posted: 31 Jan 2009, 19:20:14 UTC

I booted the Sun to the other enviroment and it has a tool called "Solris Managment Console 2.1" and it looks like that has the tools that I need.
ID: 860348 · Report as offensive
Profile ML1
Volunteer moderator
Volunteer tester

Send message
Joined: 25 Nov 01
Posts: 20147
Credit: 7,508,002
RAC: 20
United Kingdom
Message 861111 - Posted: 2 Feb 2009, 15:18:31 UTC

Good that you look to have solved your problem.

If you were only suffering from too little HDD resource, then you can adjust the Boinc limits in your account preferences on your s@h account page.

Happy crunchin',
Martin

See new freedom: Mageia Linux
Take a look for yourself: Linux Format
The Future is what We all make IT (GPLv3)
ID: 861111 · Report as offensive
Profile Kleineschay2

Send message
Joined: 14 Aug 99
Posts: 97
Credit: 23,218,261
RAC: 0
Thailand
Message 861527 - Posted: 3 Feb 2009, 6:48:50 UTC - in response to Message 861111.  

Good that you look to have solved your problem.

If you were only suffering from too little HDD resource, then you can adjust the Boinc limits in your account preferences on your s@h account page.

Happy crunchin',
Martin


Thanks!
ID: 861527 · Report as offensive

Message boards : Number crunching : Proc/0/cwd/proc/0/cwd/proc/0/cwd


 
©2024 University of California
 
SETI@home and Astropulse are funded by grants from the National Science Foundation, NASA, and donations from SETI@home volunteers. AstroPulse is funded in part by the NSF through grant AST-0307956.