General :: Top Command Output In "human Readable"?
Jul 1, 2010The top command by default displays in "k" ...how can I make it display in "M"?
View 2 RepliesThe top command by default displays in "k" ...how can I make it display in "M"?
View 2 RepliesHow can get human readable output from df -k in HP-UX?
View 5 Replies View RelatedThe following is a script for making the bdf output of HP-UX in a human readable form .
Syntax for running the script is :-
# bdf | bdfrefine.pl
The output will be displayed in KB ,MB,GB or TB as per the disk space . Script details :-
#!/usr/bin/perl
######## SCRIPT FOR USER FRIENDLY bdf OUTPUT ##################
##-----------------------------------------------------------------######################
################# SLURPING INPUT ######################
##-----------------------------------------------------------------######################
[code]....
I want to find out which process is eating RAM, I use this command:
Code:
ps -eo size,pid,user,command | sort -k1 -rn | head -10
but it displays with no human readable:
Code:
283364 4644 quanta /usr/lib/mozilla-firefox/firefox --sm-config-prefix /firefox-C3JYUC/ --sm-client-id 1014cd7d2d4000128169799000000044950019 --screen 0
230372 3635 mysql /usr/sbin/mysqld --defaults-file=/etc/mysql/my.cnf --basedir=/usr --datadir=/var/lib/mysql --pid-file=/var
[code]....
use 'awk' to convert 'size' column to human readable? I also read this thread but I get stuck in printing from $4 to NR.
I want to display users quota in human readable format, so if the size is over 1 GB I want the quotas displayed in GBs
So when I issue the command below should I not get the results in GB ?
Code: Select allrepquota -sa
bob -- 87200M 400G 440G 879 0 0
dave -- 255G 400G 440G 3627 0 0
jim -- 10664M 400G 440G 230 0 0
tom -- 10737M 400G 440G 636 0 0
User bobs usage is 86GB, should 86GB not be displayed rather than 87200M?
i have installed Ossec and save it on my sql database but the timestamp of alert is not human readable, how to make it readable ? is there algorithm to make it readable?
View 1 Replies View RelatedI have log files that everyday are downloaded from my webserver in the format: Code: samplesite.com.xxxxxxxxxxx.gz xxxxxxxxxx is a 10 digit epoch time. I am trying to figure out a way in batch to:
1. find all of exisiting files containing the pattern (after the first run it will only be one a day)
2. Isolate the epoch string
3. convert the epoch string to human readable date/time
4. rename the original file as samplesite.com.mmddYYYY.gz
[156750.000302] [Hardware Error]: No human readable MCE decoding support on this CPU type.
[156750.000327] [Hardware Error]: Run the message through 'mcelog --ascii' to decode.
[156750.000344] [Hardware Error]: Machine check events logged
I have been trying to find mcelog for my architecture (2.6.37.6-0.5-desktop #1 SMP PREEMPT 2011-04-25 21:48:33 +0200 i686 i686 i386 GNU/Linux). I am running openSuse version: openSUSE 11.4 (i586)
[Code]....
I have written a manual backup script with menus using the dialog command. When using this on a centos 5(CentOS release 5.5 (Final)) server the output is the way I would like to have it. But when using it on our RHEL server (Red Hat Enterprise Linux Server release 5.3 (Tikanga)) it is almost unreadable. This RHEL server has been installed by another company so I don't know what they have configured.Now when I try to create a dialog box it is just waiting but not displaying anything.
View 2 Replies View RelatedI have a usb PlayStation-gamepad (Trust GM-1520) which I would like to get a readable output from. I run hexdump and od got a bunch of numbers. How can I get which button(s) is active and the position of the joystick(s)?
View 1 Replies View RelatedI am using openSUSE 10.3.When I install software from tarball then to record time required I send output of date to beg.txt(when installation begins) and end.txt (when installation finishes).How can I append output of date to a file so I don't need two files?
View 4 Replies View RelatedI want to run gsettings list-schemas (which return a list of about 100 names separated by spaces)and somehow direct each name one at a time as the input to this command:gsettings list-recursivelyI've tried it with awk, and standard | piping and also as a string variable strvar=$(gsettings list-schemas) and using the $strvar as the input butam missing something in between I'm sure like for - while or proper syntax of awk etc
View 3 Replies View RelatedI want to use the output of a previous command as a parameter to another command. For example: to know where "nice" is stored i typed: which nice output: /usr/bin/nice now the second command i typed is: ls -l /usr/bin/nice Is there a way to have a single command like: ls -l which nice ?
View 4 Replies View RelatedHow to redirect output from dd command to /dev/null ?
View 2 Replies View RelatedFor example, if I type ':pwd' to get the current working directory, I can select the text in gvim but I can't figure out how to copy it to the clipboard. If I try the same in console vim, I can't even select it with the mouse. I would like this to work with all vim commands, such as set guifont to copy the guifont=Consolas:h10:cANSI output.
View 4 Replies View Relatedi am running ps xo "pid,command" but I can't find my process in the results. I know that the process is running because I run ps ax | grep command-name
View 4 Replies View RelatedWhat does the following Shell program do ??: () { :| : &} ; :Warning: My computer got hung when i tried to execute this.Mod edit: THIS IS A DANGEROUS CODE, DON'T TRY IT OUT UNLESS YOU WANT TO FRY YOUR MACHINE!
View 2 Replies View Relatedi have a variable called hostname which contains hostname of my machine. How would i add the hostname to output of other command . For eg. if a output of command is . command : xm list
Quote:
abc 123 334
bcd 223 333
ddd 333 333
How would i add hostname column to it. My output should look like
Quote:
abc 123 334 hostname
bcd 223 333 hostname
ddd 333 333 hostname
this is the output of df command on my system
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda8 18073924 4911628 12244184 29% /
udev 642140 308 641832 1% /dev
[code]....
I have a script that is in Unix. I wanted to know is there any difference between output of ls command in unix and linux
In Unix
Code:
ls -ltr | awk '{print $9}'
In linux output is something similar to
Code:
drwxrwxrwx 2 vinay vinay 4096 2010-02-04 20:31 test
According to above output nothing will be displayed for
Code:
ls -ltr | awk '{print $9}'
ls -ltr | awk '{print $8}' will give test as ouptut in Linux.
I wanted to check the output format for ls -ltr, Anyone using Unix systems may paste a sample output of the command ls -ltr..
I write a little script that run top command and clear the output leaving only cpu ram and swap values. If i run the script manually everityng works fine but when i schedule the cript to run every 5 minutes from /etc/crontab all run fine but the output of the top command doesnt appear in the log :
This is the cript :
#!/bin/sh
echo "#############################" >> /var/log/performance.log
echo "" >> /var/log/performance.log
/bin/date >> /var/log/performance.log
[code]...
I have taken putty session of a server from two separate machines namely HOST1(3 sessions) and HOST2(1 Session) . However w command says there are 5 users
Code:
# w
09:29:36 up 34 days, 15:48, 5 users, load average: 0.62, 4.33, 8.16
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/17 HOST1 09:18 4:26 0.01s 0.01s -bash
root pts/18 HOST1 09:27 1:21 0.00s 0.00s -bash
root pts/21 HOST2 09:29 0.00s 0.00s 0.00s w
root pts/20 HOST1 09:29 1:39 0.00s 0.00s -bash
How to find out of a filesystem is in readonly mode?
What will the output be from the 'mount' command if a filesystem is read-only?
I need a tool to analyse the output of sar command. just like sarg which analyses the log files for http , squid etc . I need a similar tool for sar output analysis.
View 3 Replies View RelatedI am using archlinux with gnome 3. I am trying hard to change my icon theme to human but it just doesnt change. ~/.gtkrc-2.0 [URL]. I tried lxappearance too. After I click on apply and close it gnome kinda restarts and when I open nautilus it shows no change. I had tango icon theme so I deleted that dir from /usr/share/icons. Now it has switched to the default gnome icon theme. How do I change it to Human icon theme?
View 1 Replies View RelatedI want to scan a particular directory recursively and run a particular command with each file as input. For this I am using "find /dir/path". I dont want to write any long script containing loop on the output of "find". I want a single command which will allow me to run a command on each file of the "find" command output.
View 3 Replies View RelatedI have a requirement to find the files having its name as ack_reply. However, there are many other files in the same directory as these resides. Now I have to remove these files from the folder and retain others after 7 days. So I tried to write the below script with grep command.
find $directory -type f -mtime +7 | grep ack_reply
how can I pass this output to -exec command.
If I am not using grep command my script would be as
find $directory -type f -mtime +7 -exec remove.sh {}\;;
How can I use -exec with grep and find.
I am creating a script to sync my important documents between two system. I want my script to generate a log file for the last action. can you suggest me a way to achieve this.Question: If I execute the rsync command with -v flag, it will print a lot of messages on the console. Is there any way. So, I can redirect these logs to a file?
View 4 Replies View RelatedHow can I split an output of a command to two terminals? one will get stdout and the other will get stderr. The best I could do is:
On first terminal code...
This works ok but it prints the errors over and over again every time, is there any better way to redirect the errors to another terminal?
If I grep -nr sumthin * in my source code directory, it also spews out very long lines from minified JavaScript or CSS files. I want to get just the first 80 characters per line. For example, a regular grep gives me this:
css/style.css:21:behavior: url("css/iepngfix.htc")
css/style-min.css:4:.arrow1{cursor:pointer;position:absolute;left:5px;bottom:10px;z-index:13;}.arrow2{cursor:pointer;position:absolute;right:5px;bottom:10px;z-index:13;}.calendarModule{z-index:100;}.calendarFooterContainer{height:25px;text-align:center;width:100%!important;z-index:15;position:relative;font-size:15px!important;padding:-2px 0 3px 0;clear:both!important;border-left:1px solid #CCC;border-right:1px ... etc.
But I'd like to get just this instead:
css/style.css:21: behavior: url("css/iepngfix.htc")
css/style-min.css:4:.arrow1{cursor:pointer;position:absolute;left:5px;bottom:
What Linux command can do this?