Sponsored Content
Full Discussion: Sort mixed data file
Top Forums UNIX for Advanced & Expert Users Sort mixed data file Post 302845911 by RudiC on Thursday 22nd of August 2013 02:58:34 PM
Old 08-22-2013
What about analysing and trying to understand mjf's suggestion, and then adapting it YOURSELF to your new specification?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sort a big data file

Hello, I have a big data file (160 MB) full of records with pipe(|) delimited those fields. I`m sorting the file on the first field. I'm trying to sort with "sort" command and it brings me 6 minutes. I have tried with some transformation methods in perl but it results "Out of memory". I was... (2 Replies)
Discussion started by: rubber08
2 Replies

2. Shell Programming and Scripting

Ignore Header and Footer and Sort the data in fixed width file

Hi Experts, I want to Sort the data in fixed width file where i have Header and Footer also in file. I m using below commad to do the sort based on field satarting from 15 position to 17 position , but it is not ignoring the Header and Footer of the file while sorting. In the output i am... (5 Replies)
Discussion started by: sasikari
5 Replies

3. Shell Programming and Scripting

Sort a the file & refine data column & row format

cat file1.txt field1 "user1": field2:"data-cde" field3:"data-pqr" field4:"data-mno" field1 "user1": field2:"data-dcb" field3:"data-mxz" field4:"data-zul" field1 "user2": field2:"data-cqz" field3:"data-xoq" field4:"data-pos" Now i need to have the date like below. i have just... (7 Replies)
Discussion started by: ckaramsetty
7 Replies

4. Shell Programming and Scripting

Advanced: Sort, count data in column, append file name

Hi. I am not sure the title gives an optimal description of what I want to do. Also, I tried to post this in the "UNIX for Dummies Questions & Answers", but it seems no-one was able to help out. I have several text files that contain data in many columns. All the files are organized the same... (14 Replies)
Discussion started by: JamesT
14 Replies

5. Shell Programming and Scripting

How to use FS for mixed file?

Hi! All I am just wondering solution to use FS if file fields are separated by whitespace (one or more spaces ), tab and comma, How to use FS ? finally I want to print all columns as tab separated look at my file here tagged 130, US 121337 30.530 -58.900 1941 1 25 19.50 ... (5 Replies)
Discussion started by: Akshay Hegde
5 Replies

6. Shell Programming and Scripting

awk - mixed for and if to select particular lines in a data file

Hi all, I am new to AWK and I am trying to solve a problem that is probably easy for an expert. Suppose I have the following data file input.txt: 20 35 43 20 23 54 20 62 21 20.5 43 12 20.5 33 11 20.5 89 87 21 33 20 21 22 21 21 56 87 I want to select from all lines having the... (4 Replies)
Discussion started by: naska
4 Replies

7. Shell Programming and Scripting

Using awk to parse a file with mixed formats in columns

Greetings I have a file formatted like this: rhino grey weight=1003;height=231;class=heaviest;histology=9,0,0,8 bird white weight=23;height=88;class=light;histology=7,5,1,0,0 turtle green weight=40;height=9;class=light;histology=6,0,2,0... (2 Replies)
Discussion started by: Twinklefingers
2 Replies

8. Shell Programming and Scripting

Sort data file by case

Hello, I'm trying to sort a large data file by the 3rd column so that all of the first words in the 3rd column that are in all uppercase appear before (or after) the non uppercase words. For example, Data file: xxx 12345 Rat in the house xxx 12345 CAT in the hat xxx 12345 Dog in the... (4 Replies)
Discussion started by: palex
4 Replies

9. Shell Programming and Scripting

Sort data in text file in particular format

I have to sort below output in text file in unix bash 20170308 DA,I,113 20170308 PM,I,123 20170308 DA,U,22 20170308 PM,U,123 20170309 DA,I,11 20170309 PM,I,23 20170309 DA,U,123 20170309 PM,U,233 (8 Replies)
Discussion started by: Adfire
8 Replies

10. Shell Programming and Scripting

Sort file data according to a custom list of string

I have a string of pre defined ip address list which will always remain constant their order will never change like in below sample: iplist=8.8.5.19,9.7.5.14,12.9.9.23,8.8.8.14,144.1.113 In the above example i m considering only 5 ips but there could be many more. Now i have a file which... (15 Replies)
Discussion started by: mohtashims
15 Replies
mpstat(1M)																mpstat(1M)

NAME
mpstat - report per-processor or per-processor-set statistics SYNOPSIS
/usr/bin/mpstat [-aq] [-p | -P set] [interval [count]] The mpstat command reports processor statistics in tabular form. Each row of the table represents the activity of one processor. The first table summarizes all activity since boot. Each subsequent table summarizes activity for the preceding interval. All values are rates listed as events per second unless otherwise noted. During execution of the kernel status command, the state of the kernel can change. If relevant, a state change message is included in the mpstat output, in one of the following forms: <<processor 3 moved from pset: -1 to: 1>> <<pset destroyed: 1>> <<pset created: 1>> <<processors added: 1, 3>> <<processors removed: 1, 3>> The mpstat command reports the following information: CPU or SET Without the -a option, mpstat reports CPU statistics for a processor ID. With the -a option, mpstat reports SET statistics for a processor set ID. minf minor faults mjf major faults xcal inter-processor cross-calls intr interrupts ithr interrupts as threads (not counting clock interrupt) csw context switches icsw involuntary context switches migr thread migrations (to another processor) smtx spins on mutexes (lock not acquired on first try) srw spins on readers/writer locks (lock not acquired on first try) syscl system calls usr percent user time sys percent system time wt the I/O wait time is no longer calculated as a percentage of CPU time, and this statistic will always return zero. idl percent idle time sze number of processors in the requested processor set set processor set membership of each CPU The following options are supported: -a Aggregate output by processor set. Sort the output by set. The default output is sorted by CPU number. -p Report processor set membership of each CPU. Sort the output by set. The default output is sorted by CPU number. -P set Display only those processors in the specified set. -q Suppress messages related to state changes. interval Report once each interval seconds. count Only print count reports. Example 1: Using mpstat to Generate User and System Operation Statistics The following command generates processor statistics over a five-second interval in two reports. The command shows the processor set mem- bership of each CPU. The default output is sorted by CPU number, aggregated by processor set, for user (usr) and system (sys) operations. example% mpstat -ap 5 2 SET minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl sze 0 6 0 355 291 190 22 0 0 0 0 43 0 2 0 43 1 1 24 17 534 207 200 70 1 0 2 0 600 4 1 0 84 2 2 19 7 353 325 318 44 0 0 5 0 345 1 1 0 94 3 3 36 2 149 237 236 14 0 0 4 0 97 0 0 0 98 2 SET minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl sze 0 1 0 720 405 304 55 0 0 18 0 12 0 15 0 81 1 1 0 69 1955 230 200 313 33 4 41 9 7086 34 10 0 19 2 2 0 46 685 314 300 203 11 0 54 1 5287 36 6 0 28 3 3 0 0 14 386 384 0 0 0 0 0 0 0 0 0 100 2 See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |Interface Stability |See below. | +-----------------------------+-----------------------------+ Invocation is evolving. Human readable output is unstable. sar(1), iostat(1M), sar(1M), vmstat(1M), attributes(5) The sum of CPU utilization might vary slightly from 100 due to rounding errors in the production of a percentage figure. The total time used for CPU processing is the sum of usr and sys output values, reported for user and system operations. The idl value reports the time that the CPU is idle for any reason other than pending disk I/O operations. Run the iostat command with the -x option to report I/O service times in svc_t output. The iostat utility also reports the same wt, user (us), and system (sy) statistics. See iostat(1M) for more information. When executing in a zone and if the pools facility is active, mpstat(1M) will only provide information for those processors which are a member of the processor set of the pool to which the zone is bound. 29 Jun 2005 mpstat(1M)
All times are GMT -4. The time now is 06:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy