ssh command to read server resources

what is the ssh command to read my server resources, like system operator, Ram installed, CPU etc....?

The same as on the target system, eg. to get the OS and version:

$ ssh user@remote 'uname -a'

I guess it really depends on the distro you are running. For example, red hat distros (centos, fedora, etc.) use cpuspeed. Whereas Suse uses cpufreq-info. But any command that doesn't require a TERM environment to be set you should be able to execute just (you couldn't run top or anything this way).

cpuspeed and cpufreq-info said command bash not found.
with top show the processes, the memory used, free and the cpu used or free but does not show how much speed the cpu has.

i haave linux centos 5

If you are doing it as a regular user, you more than likely do not have /usr/sbin in you environment, so you either have to include it into your path or type the entire thing out (/usr/sbin/cpuspeed). If you are unsure, on the box in question do a 'whereis cpuspeed'.

If you don't have special tools available, there's always /proc:

$ cat /proc/cpuinfo | awk -F: '/MHz/ { total++; print "CPU"total": "$2}'
CPU1:  2207.699
$ cat /proc/memifo | grep -i total
MemTotal:        511176 kB
SwapTotal:       979956 kB

For CPU speed in particular, CentOS should have /proc/cpuinfo. Here's an excerpt from mine:

There's a good bit more than that in there, but it appears that this would answer your question. Note, though, that some CPUs are named without reference to the clock speed. You may need to look up the speed online and compare it to the "cpu MHz" line to see if your system is clocking in the right neighborhood.

Similarly, cat /proc/meminfo gives information about the memory, as does top.

this is the result: -bash: /usr/sbin/cpuspeed: No such file or directory

and

and also -bash: /proc/cpuinfo: Permission denied

Normally cpuinfo is world readable. I'd just stick to analyzing those proc files. Looks like you got script problems though, if that is your output.

btw its /proc/meminfo

The second quote there is odd... It looks like you copied and pasted pludi's post directly. A couple of pointers:

1) The $ is a prompt. It's not part of the command. Ignore the $ and the space following it. Just copy and paste the rest of the line. I suspect that this is why your cat commands failed.
2) In pludi's example, the lines without the $ are output. Don't copy and paste them.

These are the commands that should be copied and pasted:

cat /proc/cpuinfo | awk -F: '/MHz/ { total++; print "CPU"total": "$2}'

and

cat /proc/memifo | grep -i total

Or, if you want to see complete output, just remove the pipe and everything after it from each command.

The "code" I posted is not a shell script, but an example of the commands you can use to obtain information from /proc/* and a sample of what the output may look like. I'll color code it:

  • GREEN The shell prompt, in your case "[root@host145-236-149-62 ~]#"
  • RED The actual command, what you have to enter
  • BLUE Sample output from running the command in one of my VMs
$ cat /proc/cpuinfo | awk -F: '/MHz/ { total++; print "CPU"total": "$2}'
CPU1:  2207.699
$ cat /proc/memifo | grep -i total
MemTotal:        511176 kB
SwapTotal:       979956 kB

cat: /proc/memifo: No such file or directory

the other command for cpu work

Tiny error... it's "meminfo", not "memifo". Fwiw, remember to tab-complete... that can help a lot on little things like that.