Sponsored Content
Full Discussion: DF output via SSH
Operating Systems BSD DF output via SSH Post 40301 by woodstone on Friday 12th of September 2003 09:18:22 AM
Old 09-12-2003
PuTTy:
$ ps -ft `tty`
ps: illegal option -- f
usage: ps [-][acCehjklmrSTuvwx] [-O|o fmt] [-p pid] [-t tty] [-U user]
[-M core] [-N system] [-W swap]
ps [-L]
$ type df
df is an alias for 'df -k'
$ echo BLOCKSIZE = $BLOCKSIZE
BLOCKSIZE =


wodSSH
$ ps -ft `tty`
ps: illegal option -- f
usage: ps [-][acCehjklmrSTuvwx] [-O|o fmt] [-p pid] [-t tty] [-U user]
[-M core] [-N system] [-W swap]
ps [-L]
$ type df
df is a tracked alias for /bin/df
$ echo BLOCKSIZE = $BLOCKSIZE
BLOCKSIZE =

dirk.

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script that Redirect SSH output via cron

Hi, I have a script that's being called via a crontab which is a wrapper script that creates a log for the script that gets executed. Within the script that gets executed, it also run's subscripts. I've been able to get everything to work .. but the issue is one of the subscript that goes out... (4 Replies)
Discussion started by: primp
4 Replies

2. Shell Programming and Scripting

Piped output from SSH tunnel hangs?

Hi All, When starting an SSH tunnel, piped output 'hangs' (on AIX) : ssh -Nf -Llocalhost:22000:server:22 proxy | cat -vet - ... hangs ... Does anybody know how to prevent this? Of course, in my script I don't use the tunnel as I do in the example above. In my script the call to ssh is... (7 Replies)
Discussion started by: whbos
7 Replies

3. Shell Programming and Scripting

how to format ssh top output

Hello; Am trying to generate runaway proc report using ssh thusly: =================== ssh -t -t $BOX 'TERMINAL="vt100" top -d1 -h -n 10' >> $FILE . . cat $FILE | mail -s "Latest Top `date`" $MAIL_TO ==================== But the output to e-mail comes out rather garbled .. Any ideas... (1 Reply)
Discussion started by: delphys
1 Replies

4. Shell Programming and Scripting

Weird tail output over ssh

Hello; Am trying to correct the formatting of tail output over ssh. Using the following code: echo "" > $FILE for BOX in $SERVERS do echo "Processing on $BOX" |tee -a $FILE echo "===============================" >> $FILE sudo ssh $BOX 'TERMINAL="vt100" /usr/bin/sh -s' <... (2 Replies)
Discussion started by: delphys
2 Replies

5. Shell Programming and Scripting

Seeing output of command over ssh

Hey Guys, i have a script that generates logs at our isilon storage. The part of the script is to geneate logs and grep its name: VAR=`ssh -o UserKnownHostsFile=/dev/null root@XXX isi_gather_info | grep -i "Package:" | awk '{ print $2 }'` Now , while this is run, i do not see the status of... (2 Replies)
Discussion started by: anshulsahdev
2 Replies

6. Shell Programming and Scripting

SSH - remote output locally

The code below works ok, however; I need to output the results to a local variable the_path="/mnt/back/hang" ssh -T -i /home/buddy/.ssh/id_rsa buddy@ginger << EOF find ${the_path} -name "*.jpg" | wc -l > ## output to local variable exit EOF (3 Replies)
Discussion started by: squrcles
3 Replies

7. Shell Programming and Scripting

Error in SSH output.

Hi All, I am using below command in a shell script. ssh -q RemoteUser@RemoteServer "/export/sctipt/test.ksh" It is executing succesfully but the below is the output getting displayed. tset: standard error: Invalid argument Can you please help me in understanding below. ... (8 Replies)
Discussion started by: Girish19
8 Replies

8. Shell Programming and Scripting

Getting SSH Output From Remote to Local Session?

Hi everyone, after about 2 days of scratching my head on this one, I'm finally ready to punt this and ask for some actual help. Here's the situation. We have 1 server, that runs multiple VM's. To gain access to those VM's we ssh from host01 to the other vm hosts. For example when we first log... (4 Replies)
Discussion started by: Lost in Cyberia
4 Replies

9. Shell Programming and Scripting

Ssh output

Hi, I need to get the output of ssh for multiple servers using for loop which is returning how many users are logged in, one below the other. But i'm getting output in single line for one of the servers. XXXX pts/0 Oct 18 08:45 abcd pts/3 Oct 18 06:46 abcde pts/4 Oct 18 06:46 xyzqw pts/5 Oct 18... (14 Replies)
Discussion started by: sam_bd
14 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
PSTAT(8)						    BSD System Manager's Manual 						  PSTAT(8)

NAME
pstat, swapinfo -- display system data structures SYNOPSIS
pstat [-Tfghkmnst] [-M core [-N system]] swapinfo [-ghkm] [-M core [-N system]] DESCRIPTION
The pstat utility displays open file entry, swap space utilization, terminal state, and vnode data structures. If invoked as swapinfo the -s option is implied, and only the -k, -m, -g, and -h options are legal. If the -M option is not specified, information is obtained from the currently running kernel via the sysctl(3) interface. Otherwise, infor- mation is read from the specified core file, using the name list from the specified kernel image (or from the default image). The following options are available: -n Print devices out by major/minor instead of name. -h ``Human-readable'' output. Use unit suffixes when printing swap partition sizes: Byte, Kilobyte, Megabyte, Gigabyte, Terabyte and Petabyte. -k Print sizes in kilobytes, regardless of the setting of the BLOCKSIZE environment variable. -m Print sizes in megabytes, regardless of the setting of the BLOCKSIZE environment variable. -g Print sizes in gigabytes, regardless of the setting of the BLOCKSIZE environment variable. -T Print the number of used and free slots in several system tables. This is useful for checking to see how large system tables have become if the system is under heavy load. -f Print the open file table with these headings: LOC The core location of this table entry. TYPE The type of object the file table entry points to. FLG Miscellaneous state variables encoded thus: R open for reading W open for writing A open for appending I signal pgrp when data ready CNT Number of processes that know this open file. MSG Number of messages outstanding for this file. DATA The location of the vnode table entry or socket structure for this file. OFFSET The file offset (see lseek(2)). -s Print information about swap space usage on all the swap areas compiled into the kernel. The first column is the device name of the partition. The next column is the total space available in the partition. The Used column indicates the total blocks used so far; the Available column indicates how much space is remaining on each partition. The Capacity reports the percentage of space used. If more than one partition is configured into the system, totals for all of the statistics will be reported in the final line of the report. -t Print table for terminals with these headings: LINE Device name. INQ Number of characters that can be stored in the input queue. CAN Number of characters in the input queue which can be read. LIN Number of characters in the input queue which cannot be read yet. LOW Low water mark for input. OUTQ Number of characters that can be stored in the output queue. USE Number of bytes in the output queue. LOW Low water mark for output. COL Calculated column position of terminal. SESS Process ID of the session leader. PGID Process group for which this is the controlling terminal. STATE Miscellaneous state variables encoded thus: I init/lock-state device nodes present C callout device nodes present O opened c console in use G gone B busy in open(2) Y send SIGIO for input events L next character is literal H high watermark reached X open for exclusive use S output stopped (ixon flow control) l block mode input routine in use Z connection lost s i/o being snooped b busy in read(2) or write(2) The 'i' and 'o' characters refer to the previous character, to differentiate between input and output. -M Extract values associated with the name list from the specified core. -N If -M is also specified, extract the name list from the specified system instead of the default, which is the kernel image the system has booted from. SEE ALSO
ps(1), systat(1), stat(2), fs(5), iostat(8), vmstat(8) K. Thompson, UNIX Implementation. HISTORY
The pstat utility appeared in 4.0BSD. BUGS
Does not understand NFS swap servers. BSD
October 11, 2014 BSD
All times are GMT -4. The time now is 12:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy