Sponsored Content
Operating Systems Linux Fedora ssh command to read server resources Post 302344112 by pludi on Friday 14th of August 2009 03:29:06 PM
Old 08-14-2009
If you don't have special tools available, there's always /proc:
Code:
$ 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

 

10 More Discussions You Might Find Interesting

1. Solaris

solaris server resources utilized

Hi i have a requirement when i have to check the solaris 9 os resources utilised by the applications( Oracle, veritas cluster, veritas net backup ) what are the commands i should use or any utility to check the resources Regards (7 Replies)
Discussion started by: maooah
7 Replies

2. Shell Programming and Scripting

Retrive the value returned by a command excuted in a remote server using ssh

Hello Everybody, I'm facing a weird problem with the awk command. I try to retrieve in a variable the value returned by a simple ls command. ls /export/home/tmp |tail -1 return a good value (the name of the . But When I try to execute the same command in a remote server using ssh as... (2 Replies)
Discussion started by: Jabarod
2 Replies

3. UNIX for Dummies Questions & Answers

Long listing of files using find command on remote server via SSH

Hi , I am trying to find some files on a remote machine using the find command. >ssh -q atukuri@remotehostname find /home/atukuri/ -name abc.txt /home/atukuri/abc.txt The above command works fine and lists the file, but if I want to do a long listing of files (ls -l) its not working . ... (2 Replies)
Discussion started by: atukuri
2 Replies

4. UNIX Desktop Questions & Answers

ssh command doesnot excute commands in the destination server

Hi All, I have the below code where Iam connecting from xzur111pap server to xzur0211pap server thru ssh to execute some commands. ssh xzur0211pap spaceleft=`df -k /home |tail -1 | awk '{print $5}'` spaceleft=${spaceleft%\%} if ]; then echo "ALERT : HUFS(/home $spaceleft)" exit 0... (3 Replies)
Discussion started by: gaddamja
3 Replies

5. UNIX for Dummies Questions & Answers

ssh command to execute shell script in another server

ssh -q <hostname> /opt/tcs/satish/tst.ksh ssh -q <anotherserver> /opt/tcs/satish/tst.ksh tst.ksh has "nohup <command> & " when i execute below script , its throwing error as nohup can not be found ssh -q <anotherserver> /opt/tcs/satish/tst.ksh > log & can someone let me... (5 Replies)
Discussion started by: only4satish
5 Replies

6. Shell Programming and Scripting

Connect (SSH) to Windows server via Linux server through a script and passing command.. but failing

I am trying to connect to Windows server via Linux server through a script and run two commands " cd and ls " But its giving me error saying " could not start the program" followed by the command name i specify e g : "cd" i am trying in this manner " ssh username@servername "cd... (5 Replies)
Discussion started by: sunil seelam
5 Replies

7. Shell Programming and Scripting

Execute command using ssh server 'cmd'

Hi The command below does not work as it require to take command in the breakers But If I do so the variable values get lost ssh testserver01 'dsmc q b "${ARCHIVE_DIR}*" -sub=yes -querysummary -inactive -fromd="${BACKUP_DATE}"' Thank you. (3 Replies)
Discussion started by: zam
3 Replies

8. Shell Programming and Scripting

Send command via ssh to another server

Hello, i`m tryeing to execute loop on remote server and i have problems with syntax my command is ssh root@server "for i in /vz/private/*; do b=`ls -la $i/usr/bin/crontab | awk '{print $1}'`; echo $b; done" with this command i`m tryeing to get all permissions of file /usr/bin/crontab... (1 Reply)
Discussion started by: bacarrdy
1 Replies

9. UNIX for Advanced & Expert Users

Command to check if the server is not reachable using ssh

I have list for servers say server1, server2, server3.....server20 I want to test the ssh connectivity of each server, if any one of the server is down then ssh connectivity fails and the script results something like echo "serever is not reachable" Now I m confused using which command shall I... (2 Replies)
Discussion started by: sam@sam
2 Replies

10. Shell Programming and Scripting

Read several variables from command output via SSH

Hi Folks, I'm currently trying to read several values into different variables. Actually, what I'm doing works, but I get an error message. My attempts are: read strCPROC strIPROC strAPROC <<<$(ssh -n -T hscroot@$HMC "lshwres -r proc -m $strIDENT --level sys -F \"configurable_sys_proc_units... (11 Replies)
Discussion started by: NKaede
11 Replies
Sys::Statistics::Linux::SysInfo(3pm)			User Contributed Perl Documentation		      Sys::Statistics::Linux::SysInfo(3pm)

NAME
Sys::Statistics::Linux::SysInfo - Collect linux system information. SYNOPSIS
use Sys::Statistics::Linux::SysInfo; my $lxs = Sys::Statistics::Linux::SysInfo->new; my $info = $lxs->get; DESCRIPTION
Sys::Statistics::Linux::SysInfo gathers system information from the virtual /proc filesystem (procfs). For more information read the documentation of the front-end module Sys::Statistics::Linux. SYSTEM INFOMATIONS
Generated by /proc/sys/kernel/{hostname,domainname,ostype,osrelease,version} and /proc/cpuinfo, /proc/meminfo, /proc/uptime, /proc/net/dev. hostname - The host name. domain - The host domain name. kernel - The kernel name. release - The kernel release. version - The kernel version. memtotal - The total size of memory. swaptotal - The total size of swap space. uptime - The uptime of the system. idletime - The idle time of the system. pcpucount - The total number of physical CPUs. tcpucount - The total number of CPUs (cores, hyper threading). interfaces - The interfaces of the system. arch - The machine hardware name (uname -m). # countcpus is the same like tcpucount countcpus - The total (maybe logical) number of CPUs. "pcpucount" and "tcpucount" are really easy to understand. Both values are collected from "/proc/cpuinfo". "pcpucount" is the number of physical CPUs, counted by "physical id". "tcpucount" is just the total number counted by "processor". If you want to get "uptime" and "idletime" as raw value you can set $Sys::Statistics::Linux::SysInfo::RAWTIME = 1; # or with Sys::Statistics::Linux::SysInfo->new(rawtime => 1) METHODS
new() Call "new()" to create a new object. my $lxs = Sys::Statistics::Linux::SysInfo->new; get() Call "get()" to get the statistics. "get()" returns the statistics as a hash reference. my $info = $lxs->get; EXPORTS
No exports. SEE ALSO
proc(5) REPORTING BUGS
Please report all bugs to <jschulz.cpan(at)bloonix.de>. AUTHOR
Jonny Schulz <jschulz.cpan(at)bloonix.de>. COPYRIGHT
Copyright (c) 2006, 2007 by Jonny Schulz. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-03-09 Sys::Statistics::Linux::SysInfo(3pm)
All times are GMT -4. The time now is 11:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy