Hi all
i am trying to copy this folder /proc to other computer
but all parameters in /proc are gone
eg: cpuinfo
how can I copy it and keep the information?
thank you
---------------------------------
Yahoo! Canada Toolbar : Search from anywhere on the web and bookmark your favourite sites. Download it now!
why are you trying to do that? (that is, copy the /proc contents)
2008/3/18 chloe K chloekcy2000@yahoo.ca:
Hi all
i am trying to copy this folder /proc to other computer
but all parameters in /proc are gone
eg: cpuinfo
how can I copy it and keep the information?
thank you
Yahoo! Canada Toolbar : Search from anywhere on the web and bookmark your favourite sites. Download it now! -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Good luck :)
chloe K wrote:
Hi all
i am trying to copy this folder /proc to other computer
but all parameters in /proc are gone
eg: cpuinfo
how can I copy it and keep the information?
thank you
*Yahoo! Canada Toolbar :* Search from anywhere on the web and bookmark your favourite sites. Download it now! http://ca.toolbar.yahoo.com/
chloe K wrote:
Hi all
i am trying to copy this folder /proc to other computer
What exactly do you want to achieve by doing this?
but all parameters in /proc are gone
eg: cpuinfo
This is because the 'files' in /proc don't actually exist as such.
/proc is a kernel reporting (and in some cases tuning) mechanism. You can't really change much of it, but the items you can mess with are mostly controlled by sysctl, so sysctl -a > mysysctls would copy those settings for you.
how can I copy it and keep the information?
for individual files you could probably do something like this:
cat /proc/cpuinfo > cpuinfo.txt
and then copy the cpuinfo.txt file to another computer.
But it would help to know why you wish to do this as it seems there may be better ways to achieve your goals.
Stuart
On 18/03/2008, chloe K chloekcy2000@yahoo.ca wrote:
Hi all
i am trying to copy this folder /proc to other computer
but all parameters in /proc are gone
eg: cpuinfo
how can I copy it and keep the information?
the /proc mount point doesn't correspond to any data stored on a hard disk or any other data storeage media, if that's what you're assuming. It's actually a "filesystem" exposed by the kernel. It's therefore not meaningful to copy it across to another computer. Perhpas if you explained a little more about what you're trying to do, people could help you some more.
hi Stuart
thank you so much. you are very helpful
but someone made this computer to hide something sysctl -a and /etc/sysctl.conf are not in the system
thank you again
Stuart Sears stuart@sjsears.com wrote: chloe K wrote:
Hi all
i am trying to copy this folder /proc to other computer
What exactly do you want to achieve by doing this?
but all parameters in /proc are gone
eg: cpuinfo
This is because the 'files' in /proc don't actually exist as such.
/proc is a kernel reporting (and in some cases tuning) mechanism. You can't really change much of it, but the items you can mess with are mostly controlled by sysctl, so sysctl -a > mysysctls would copy those settings for you.
how can I copy it and keep the information?
for individual files you could probably do something like this:
cat /proc/cpuinfo > cpuinfo.txt
and then copy the cpuinfo.txt file to another computer.
But it would help to know why you wish to do this as it seems there may be better ways to achieve your goals.
Stuart
Hi all
i just want to get all information stored in /proc/net
ls it possible?
Thank you
Jonathan Underwood jonathan.underwood@gmail.com wrote: On 18/03/2008, chloe K wrote:
Hi all
i am trying to copy this folder /proc to other computer
but all parameters in /proc are gone
eg: cpuinfo
how can I copy it and keep the information?
the /proc mount point doesn't correspond to any data stored on a hard disk or any other data storeage media, if that's what you're assuming. It's actually a "filesystem" exposed by the kernel. It's therefore not meaningful to copy it across to another computer. Perhpas if you explained a little more about what you're trying to do, people could help you some more.
On 18/03/2008, chloe K chloekcy2000@yahoo.ca wrote:
Hi all
i just want to get all information stored in /proc/net
ls it possible?
If you really want to make a snapshot of the file contents under /proc/net onto disk, you could:
1) mkdir procnet 2) cd procnet 3) create a file called snapshot with the following contents: #!/bin/bash
for i in `find /proc/net -type d` ; do mkdir -p .$i done
for i in `find /proc/net -type f` ; do echo $i cat $i > .$i done
4) chmod +x snapshot 5) ./snapshot
And then in your procnet directory, you should see a replica tree of /proc/net
There's probably a more elegant way of scripting this - I'm sure scripting gurus will jump in :)
J.
chloe K wrote:
Hi all
i just want to get all information stored in /proc/net
ls it possible?
something like this?
mkdir /tmp/net
for dir in $(find /proc/net -type d | sed 's,/proc/net/,,') do mkdir -p /tmp/net/$dir; done
for file in $(find /proc/net -type f | sed 's,/proc/net/,,') do cat /proc/net/$file > /tmp/net/$file done
then backup /tmp/net
ps how did you end up with not sysctl command? it should be in /sbin (it wouldn't have been any use for this requirement anyway)
Regards,
Stuart
On Tue, 2008-03-18 at 14:47 -0400, chloe K wrote:
hi Stuart
thank you so much. you are very helpful
but someone made this computer to hide something sysctl -a and /etc/sysctl.conf are not in the system
Are you sure? Check if you have /sbin/sysctl. If it's there, you're probably trying to run sysctl as a normal user rather than root. Since /sbin is not on the default PATH, the Shell won't find it.
Also, do "rpm --verify procps" (as root) and see what it says. This checks that the procps package which sysctl is part of, is correctly installed.
poc
On 2008-03-18, Jonathan Underwood jonathan.underwood@gmail.com wrote:
If you really want to make a snapshot of the file contents under /proc/net onto disk, you could:
- mkdir procnet
- cd procnet
- create a file called snapshot with the following contents:
#!/bin/bash
for i in `find /proc/net -type d` ; do mkdir -p .$i done
for i in `find /proc/net -type f` ; do echo $i cat $i > .$i done
- chmod +x snapshot
- ./snapshot
And then in your procnet directory, you should see a replica tree of /proc/net
There's probably a more elegant way of scripting this - I'm sure scripting gurus will jump in :)
Maybe something like this:
$ mkdir procnet $ tar cf - /proc/net/*|(cd procnet;tar xvf -)
Maybe something like this:
$ mkdir procnet $ tar cf - /proc/net/*|(cd procnet;tar xvf -)
Did you try that? tar doesn't work for me, neither cp -r, or other obvious things. A lot of those utils try to memory map the file, or other things like check the size (always zero for /proc). cat works.
On 2008-03-18, chloe K chloekcy2000@yahoo.ca wrote:
i am trying to copy this folder /proc to other computer
but all parameters in /proc are gone
eg: cpuinfo
how can I copy it and keep the information?
/proc is not a real filesystem, but a virtual filesystem designed to provide access to certain features of the running kernel. If you want to capture the contents in a real file someplace, just redirect the contents to a file, e.g. "cat /proc/cpuinfo > cpuinfo.txt"