i have a file called motors with 3 columns separated with tabs eg:
car make reg
i want to create a executable file that will add a line with data eg:
car make reg
benz s600 t35778
can you please show me how to do this? (7 Replies)
Hi all,
I need help to add additional data from file2 to existing data in file 1 using awk, sed or perl. the ID in file 1 should match against field $3 in file2
file1
#this is a new game
ID HR_1
BASE1 30
BASE2 37
DETAIL No
TYPE L
@@
ID HR_10
BASE1 6030
BASE2 ... (4 Replies)
Hi All
I need to add a column on my existing data file. I know similar posts are there but none of them were meeting my requirement. My input is
1.20 3.44 4.88
5.11 4.99 3.22
1.89 3.89 2.90
Desired output
1 1.20 3.44 4.88
2 5.11 4.99 3.22
3 1.89 3.89 2.90
I will... (2 Replies)
Hi Guys,
I have file A.txt
File A Data
AK1521
AK2536
AK3164
I want create text file of all data above and write some data on each file.
want Output on below folder
/home/kka/out
AK1521.txt
Hi
Welocme (3 Replies)
Hi,
I have a data file with :
01/28/2012,1,1,98995
01/28/2012,1,2,7195
01/29/2012,1,1,98995
01/29/2012,1,2,7195
01/30/2012,1,1,98896
01/30/2012,1,2,7083
01/31/2012,1,1,98896
01/31/2012,1,2,7083
02/01/2012,1,1,98896
02/01/2012,1,2,7083
02/02/2012,1,1,98899
02/02/2012,1,2,7083
I... (1 Reply)
Hi, I was wondering if someone would be able to help with extrapolating information from a file and filling an existing matrix with that information.
I have made a matrix like this (file 1):
A B C D
1
2
3
4
I have another file with data like this (file 2):
1 A
1 C
3 C
4 B... (1 Reply)
Hi all,
I need help for solve my problem.
my problem is like this..
i want to add many word to file. but after I add 1 word, the second word should be in the under of the first word.
i have tried but the result is like this
word1word2word3
i want the result to be like this
word1
word2... (5 Replies)
Discussion started by: weslyarfan
5 Replies
LEARN ABOUT XFREE86
sample
Packet sample action in tc(8) Linux Packet sample action in tc(8)NAME
sample - packet sampling tc action
SYNOPSIS
tc ... action sample rate RATE group GROUP [ trunc SIZE ] [ index INDEX ]
tc ... action sample index INDEX
DESCRIPTION
The sample action allows sampling packets matching classifier.
The packets are chosen randomly according to the rate parameter, and are sampled using the psample generic netlink channel. The user can
also specify packet truncation to save user-kernel traffic. Each sample includes some informative metadata about the original packet, which
is sent using netlink attributes, alongside the original packet data.
The user can either specify the sample action parameters as presented in the first form above, or use an existing sample action using its
index, as presented in the second form.
SAMPLED PACKETS METADATA FIELDS
The metadata are delivered to userspace applications using the psample generic netlink channel, where each sample includes the following
netlink attributes:
PSAMPLE_ATTR_IIFINDEX
The input interface index of the packet, if there is one.
PSAMPLE_ATTR_OIFINDEX
The output interface index of the packet. This field is not relevant on ingress sampling
PSAMPLE_ATTR_ORIGSIZE
The size of the original packet (before truncation)
PSAMPLE_ATTR_SAMPLE_GROUP
The psample group the packet was sent to
PSAMPLE_ATTR_GROUP_SEQ
A sequence number of the sampled packet. This number is incremented with each sampled packet of the current psample group
PSAMPLE_ATTR_SAMPLE_RATE
The rate the packet was sampled with
OPTIONS
rate RATE
The packet sample rate. RATE is the expected ratio between observed packets and sampled packets. For example, RATE of 100 will lead
to an average of one sampled packet out of every 100 observed.
trunc SIZE
Upon set, defines the maximum size of the sampled packets, and causes truncation if needed
group GROUP
The psample group the packet will be sent to. The psample module defines the concept of groups, which allows the user to match spe-
cific sampled packets in the case of multiple sampling rules, thus identify only the packets that came from a specific rule.
index INDEX
Is a unique ID for an action. When creating new action instance, this parameter allows to set the new action index. When using
existing action, this parameter allows to specify the existing action index. The index must 32bit unsigned integer greater than
zero.
EXAMPLES
Sample one of every 100 packets flowing into interface eth0 to psample group 12:
tc qdisc add dev eth0 handle ffff: ingress
tc filter add dev eth0 parent ffff: matchall
action sample rate 100 group 12 index 19
Use the same action instance to sample eth1 too:
tc qdisc add dev eth1 handle ffff: ingress
tc filter add dev eth1 parent ffff: matchall
action sample index 19
SEE ALSO tc(8), tc-matchall(8)psample(1)iproute2 31 Jan 2017 Packet sample action in tc(8)