Hi Chaps,
Im after some advise with a script i've written however doesnt appear to work how I would like.
Basically I have a perl script which sucessfully pulls an expect script to login to multiple nodes and obtain some output from the nodes (total number of nat ports that are in use for the relivant pool on that node).
What I want to archieve is a list of the pools from each node with the number of ports in use, They if a single nat pool is using less than x number of ports to email me.
Firstly my perl script doesn't seem to output the details as I would like, for each pool i want the line to show the node name, then the port details (as per the below, what you will notice is in the output below the node name appears to be on the line above the port details) possibly due to control characters but not sure how is best to deal with this ?
Script:
Output with new lines between node name and value although I want it all in one line.
Also could anyone help in regards to how i can I check multiple nat pool values that the script puts into variables (pool0, pool1 etc) to send an email to me if any of them fall below a certain number of ports in us.
I want an email on a per node basis rather than per pool, It should only generate an email if it falls below the configured value.
Hi all,
I have a perl script which declares two variables and calls another perl script which accesses those variables. But I am unable to access the variables in the called script. My script is as follows:
my $ENV{a}="20";
system("perl called.pl");
and my called.pl contains:
print... (3 Replies)
I'm writing a script to automate some post-install tasks on RHEL4 servers.
I need the following code to insert an 'A' in the middle of a string, then replace the string in a file. I know I can use sed to do this, but I'd like to use perl's in place edit so I don't have to write to a temp file,... (1 Reply)
Hi.
I have three arrays.
@a=('AB','CD','EF');
@b=('AB,'DG',HK');
@c=('DD','TT','MM');
I want to compare the elements of the first two array and if they match then so some substition.
I tried using the if statement using the scalar value of the array but its not giving me any output.
... (7 Replies)
I have a perl script that opens a text file containing numbers on each line:
for example:
755993
755994
755995
755996
755997
755998
The perl script takes these numbers and store them as an array @raw_data, where I can access individual numbers by using $raw_data for the value 755993.... (2 Replies)
I'm new to perl and have to create these files for my job. I have a script that I can run that will create the file, but I have to manually pass the variables to it. It is dumb and it takes a lot of time. I want to be able to pass the existing perl script a set of variables (the same variables... (4 Replies)
I don't fully understand variables in perl.
If we have a variable defined like this "my $number = 1" then this is called a lexical variable? But if you define this at the top of a script then why isn't it a global variable because it would be available throughout the file?
Sorry if this is... (1 Reply)
Hi All,
i have a requirement where i have to run a script with at least 25 arguements and position of arguements can also change. the unapropriate way is like below. can we achieve this in more good and precise way??
#!/bin/ksh
##script is sample.ksh
age=$1
gender=$2
class=$3
.
.
.... (3 Replies)
Not sure what I am doing wrong here, but I can print the list with no issue. Just a blank screen with the 'do'.
#!/usr/bin/perl
open FILE, "upslist.txt";
while ($line=<FILE>){
if ($line=~/^(.*?),(.*?)$/){
#print "ups:$1 string:$2\n";
do 'check_snmp_mgeups-0.1.pl -H $1 -C $2';
} ... (1 Reply)
I have reviewed many examples on-line about running another process (either PERL or shell command or a program), but do not find any usefull for my needs way. (Reviewed and not useful the system(), 'back ticks', exec() and open())
I would like to run another PERL-script from first one, not... (1 Reply)
Discussion started by: alex_5161
1 Replies
LEARN ABOUT SUSE
numastat
NUMACTL(8) Linux Administrator's Manual NUMACTL(8)NAME
numastat - Print statistics about NUMA memory allocation
SYNOPSIS
numastat
DESCRIPTION
numastat displays NUMA allocations statistics from the kernel memory allocator. Each process has NUMA policies that specifies on which
node pages are allocated. See set_mempolicy(2) or numactl(8) on details of the available policies. The numastat counters keep track on
what nodes memory is finally allocated.
The counters are separated for each node. Each count event is the allocation of a page of memory.
numa_hit is the number of allocations where an allocation was intended for that node and succeeded there.
numa_miss shows how often an allocation was intended for this node, but ended up on another node due to low memory.
numa_foreign is the number of allocations that were intended for another node, but ended up on this node. Each numa_foreign event has a
numa_miss on another node.
interleave_hit is the number of interleave policy allocations that were intended for a specific node and succeeded there.
local_node is incremented when a process running on the node allocated memory on the same node.
other_node is incremented when a process running on another node allocated memory on that node.
SEE ALSO numactl(8)set_mempolicy(2)numa(3)NOTES
numastat output is only available on NUMA systems.
numastat assumes the output terminal has a width of 80 characters and tries to format the output accordingly.
EXAMPLES
watch -n1 numastat
watch -n1 --differences=accumulative numastat
FILES
/sys/devices/system/node/node*/numastat
BUGS
The output formatting on machines with a large number of nodes could be improved.
SuSE Labs Nov 2004 NUMACTL(8)