I am on an effort to sending pseudo-filesystem
to other machine.
In this case, I am using /proc/cpuinfo
and /proc/meminfo
as the pseudo-filesystem example.
I have two computer that can communicate each other in ssh
.
Now, I am trying to build an *.sh code to secure copy some system file from other computer. The code was:
#INPUT
export MASTER=user@11.1.111.11
export HELPER=user@12.1.122.12
#Obtaining CPU and Memory Data
scp $MASTER:/proc/cpuinfo /master/.
scp $MASTER:/proc/meminfo /master/.
scp $HELPER:/proc/cpuinfo /helper/.
scp $HELPER:/proc/meminfo /helper/.
The idea is that I can run this script in any computer (either Master or Helper computer).
However, later on the copied files are blank and has no information inside.
I try to sudo chmod
and sudo chown
the /proc/
folder but the system said permission denied. FYI, I do not activate root
user and just using sudo
all the time.
Can anybody guide me to some solutions please?
Additional info and improvisation:
The full code is in jsfiddle
.
I am just trying to use collaboration option by jsfiddle
though this code is not a JavaScript.
http://jsfiddle.net/santosasandy/sWYLL/#&togetherjs=hCO3VuPwO4