10-24-2008
Performance Tuning
Hi All,
In last one week, i have posted many questions in this portal. At last i am succeeded to make my 1st unix script.
following are 2 points where my script is taking tooooo long.
1. Print the total number of records excluding header & footer. I have found that awk 'END{print NR - 2}' <filename> will give exact result. But my file has 520 columns seperated with ^~^. while using this command, error is 'too long...... record'. so i have used like this.
a=` cut -d~ -f1 NAM2008101601.OUT |awk 'END{print NR - 2}' `
But this is taking too long.
2. i need sum of amount column. So first i have cut that column & paste it in a file. Then i have calculated sum. But it is also taking long time.
cut -d~ -f27 $FILE_NAME | cut -c2-23 > amount
tot_val=`awk '{a+=$0}END{printf "%.5f\n",a}' amount`
Appriciate if someone can help me to get alternatives which speed up this process.
Thnaks
Amit
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
can someone tell me a good site to go to in order to learn this. please do not recommen nay books because i dont have interest in that. if you know of any good sites with good straight forward explanation on how to split loads on machines that has excessive loading, please let me know
Also,... (1 Reply)
Discussion started by: TRUEST
1 Replies
2. Filesystems, Disks and Memory
Hi all,
long time ago I posted something, but now, it is needed again :(
Currently, I am handling with a big NFS Server for more than 200 clients, this sever has to work with 256 NFSDs. Because of this huge amount of NFSDs, there are thousands of small write accesses down to the disk and... (3 Replies)
Discussion started by: malcom
3 Replies
3. UNIX for Dummies Questions & Answers
Hi to all,
I'm interested in finding an introduction about Performance Tuning under Unix (or Linux); can somebody please point me in the right direction?
Best regards (1 Reply)
Discussion started by: domyalex
1 Replies
4. Shell Programming and Scripting
Sorry,
This is out of scope of this group.But I require the clarification pretty urgently.
My Oracle database is parallely enabled.
Still,in a particular table queries do not work "parallely" always.
How is this? (9 Replies)
Discussion started by: kthri
9 Replies
5. AIX
How to do Performance monitoring and tuning in AIX. (2 Replies)
Discussion started by: AIXlearner
2 Replies
6. AIX
Please take a look at this system and give your analysis / advice. Can it be tuned to get a better performance?
We are not getting more hardware ressources at the moment.
We have to live with what we have. Application running on the system is SAS. OS is AIX 6.1
Let me know if you need output of... (7 Replies)
Discussion started by: firefox111
7 Replies
7. Solaris
Dear all,
I have a Local zone , where users feel that performance is not good.
Is it wise to collect the inputs from the local zone rather than taking from the global zone.
And also Can I tune from Global zone , so that it will reflect in local zone.
Rgds
rj (2 Replies)
Discussion started by: jegaraman
2 Replies
8. Solaris
Hello Forum,
Well I am fairly new to this Solaris os thing. One thing I would like to check for system health and performance.
I know the codes like
prstat,vmstat,sar,iostat,netstat,prtdiag -v,
What else does a want to be sys admin have to look for when checking a solaris box?
I know... (3 Replies)
Discussion started by: br1an
3 Replies
9. AIX
I have a IBM Power9 server coupled with a NVMe StorWize V7000 GEN3 storage, doing some benchmarks and noticing that single thread I/O (80% Read / 20% Write, common OLTP I/O profile) seems slow.
./xdisk -R0 -r80 -b 8k -M 1 -f /usr1/testing -t60 -OD -V
BS Proc AIO read% IO Flag IO/s ... (8 Replies)
Discussion started by: c3rb3rus
8 Replies
LEARN ABOUT CENTOS
pmdamysql
PMDAMYSQL(1) Performance Co-Pilot PMDAMYSQL(1)
NAME
pmdamysql - MySQL database PMDA
DESCRIPTION
pmdamysql is a Performance Co-Pilot PMDA which extracts live performance data from a running MySQL database.
INSTALLATION
pmdamysql uses a configuration file from (in this order):
o /etc/pcpdbi.conf
o $PCP_PMDAS_DIR/mysql/mysql.conf
This file can contain overridden values (Perl code) for the settings listed at the start of pmdamysql.pl, namely:
o database name (see DBI(3) for details)
o database user name
o database pass word
Once this is setup, you can access the names and values for the mysql performance metrics by doing the following as root:
# cd $PCP_PMDAS_DIR/mysql
# ./Install
If you want to undo the installation, do the following as root:
# cd $PCP_PMDAS_DIR/mysql
# ./Remove
pmdamysql is launched by pmcd(1) and should never be executed directly. The Install and Remove scripts notify pmcd(1) when the agent is
installed or removed.
Binary Status values in text
Some of the status values are in the form of YES/NO or ON/OFF.
Since these cannot be intepreted by tools like PMIE, they have been duplicated with a _num extension and the values of 1 (YES/ON) or 0
(NO/OFF).
Eg:
o mysql.slave_status.slave_io_running
o mysql.slave_status.slave_io_running_num
FILES
/etc/pcpdbi.conf
configuration file for all PCP database monitors
$PCP_PMDAS_DIR/mysql/mysql.conf
configuration file for pmdamysql
$PCP_PMDAS_DIR/mysql/Install
installation script for the pmdamysql agent
$PCP_PMDAS_DIR/mysql/Remove
undo installation script for the pmdamysql agent
$PCP_LOG_DIR/pmcd/mysql.log
default log file for error messages from pmdamysql
SEE ALSO
pmcd(1), pmdadbping.pl(1) and DBI(3). # vi: sw=4 ts=4 et:
3.8.10 Performance Co-Pilot PMDAMYSQL(1)