Hi all, I'd like to capture the output from the 'top' command to monitor my CPU and Mem utilisation.Currently my command isecho date
`top -b -n1 | grep -e Cpu -e Mem` I get the output in 3 separate lines.Tue Feb 24 15:00:03
Cpu(s): 3.4% us, 8.5% sy .. ..
Mem: 1011480k total, 226928k used, ....... (4 Replies)
Hi all,
I have input text file of this format
objectclass:endeavor
pid:12345
postalAddress:379 PROSPECT ST
street:STE B
l:TORRINGTON
st:CT
postalCode:067905238
telephoneNumber:9999999999... (2 Replies)
i am running df -k command on aix machine.
i got the output like this. i need to store into file and send that file into microsoft excel.i need to allign properly.
Filesystem 512 blocks Free % Used Iused %Iused Mounted on
/dev/hd4 262144 126488 52% ... (9 Replies)
Hi,
I have two files , one file with data file with attributes that need to be sent to another file to generate a predefined format.
Example:
File.txt
AP|{SSHA}VEEg42CNCghUnGhCVg==
APVG3|{SSHA}XK|"password"
AP3|{SSHA}XK|"This is test"
....
etc
---------
test.sh has... (1 Reply)
Hi All ,
Below is the perl code. from below code want to confirm one thing that
wahtever the sequence of data we are passing through json format which contains 3 tuples of different sequences
Eg:
ParentID,SystemID,SendingTime,Time,ClientLocation,ClientID,
... (1 Reply)
Hi,
I need to format the output of the command "df -h":
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rootvg-lv01
271G 13G 245G 6% /
tmpfs 16G 0 16G 0% /dev/shm
/dev/sda1 97M 50M 43M 55% /boot
/dev/mapper/d1vg-lv01
124G 105G 13G 90% /d0
I used awk:
df -h |... (6 Replies)
Input File
Symmetrix ID : 000192601507
Masking View Name : TS00P22_13E_1
Last updated at : 05:10:18 AM on Tue Mar 22,2011
Initiator Group Name : 10000000c960b9cd
Host Initiators
{
WWN : 10000000c960b9cd
WWN : 10000000c960b9dd
}
Port... (1 Reply)
Hi ,
i am generating some data by firing sql query with connecting to the database by my solaris box.
The below one should be the header line of my excel ,here its coming in separate row.
TO_CHAR(C. CURR_EMP_NO
---------- ---------------
LST_NM... (6 Replies)
Hi All,
I am new to shell scripting, Need your help in creating a shell script which converts any unix command output to JSON format output.
example:
sample df -h command ouput :
Filesystem size used avail capacity Mounted
/dev/dsk/c1t0d0s0 8.1G 4.0G 4.0G 50% /... (13 Replies)
Discussion started by: balu1234
13 Replies
LEARN ABOUT DEBIAN
json_xs
JSON_XS(1p) User Contributed Perl Documentation JSON_XS(1p)NAME
json_xs - JSON::XS commandline utility
SYNOPSIS
json_xs [-v] [-f inputformat] [-t outputformat]
DESCRIPTION
json_xs converts between some input and output formats (one of them is JSON).
The default input format is "json" and the default output format is "json-pretty".
OPTIONS -v Be slightly more verbose.
-f fromformat
Read a file in the given format from STDIN.
"fromformat" can be one of:
json - a json text encoded, either utf-8, utf16-be/le, utf32-be/le
storable - a Storable frozen value
storable-file - a Storable file (Storable has two incompatible formats)
clzf - Compress::LZF format (requires that module to be installed)
yaml - YAML (avoid at all costs, requires the YAML module :)
eval - evaluate the given code as (non-utf-8) Perl, basically the reverse of "-t dump"
-t toformat
Write the file in the given format to STDOUT.
"toformat" can be one of:
json, json-utf-8 - json, utf-8 encoded
json-pretty - as above, but pretty-printed
json-utf-16le, json-utf-16be - little endian/big endian utf-16
json-utf-32le, json-utf-32be - little endian/big endian utf-32
storable - a Storable frozen value in network format
storable-file - a Storable file in network format (Storable has two incompatible formats)
clzf - Compress::LZF format
yaml - YAML
dump - Data::Dump
dumper - Data::Dumper
Note that Data::Dumper doesn't handle self-referential data structures correctly - use "dump" instead.
EXAMPLES
json_xs -t null <isitreally.json
"JSON Lint" - tries to parse the file isitreally.json as JSON - if it is valid JSON, the command outputs nothing, otherwise it will print
an error message and exit with non-zero exit status.
<src.json json_xs >pretty.json
Prettify the JSON file src.json to dst.json.
json_xs -f storable-file <file
Read the serialised Storable file file and print a human-readable JSON version of it to STDOUT.
json_xs -f storable-file -t yaml <file
Same as above, but write YAML instead (not using JSON at all :)
lwp-request http://cpantesters.perl.org/show/JSON-XS.json | json_xs
Fetch the cpan-testers result summary "JSON::XS" and pretty-print it.
AUTHOR
Copyright (C) 2008 Marc Lehmann <json@schmorp.de>
perl v5.14.2 2010-08-17 JSON_XS(1p)