Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of memory leak under AIX

2025-03-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Today, I will talk to you about the example analysis of memory leaks under AIX, which may not be well understood by many people. in order to make you understand better, the editor has summarized the following for you. I hope you can get something according to this article.

The main purpose of memory leak is to monitor the memory consumption of the process. Under AIX, you can get the memory consumption through ps vg, so as to compare

In addition, there is a very useful script: post_vg.sh is used to compare memory increases

Here is an automatic script that used to monitor memory leaks

-

-- run_ps_vg.sh--

-

# crontab-e

# 10, home/root/run_vg.sh, 20, 30, 40, 50, 59, 9-20 * / home/root/postvg.trc

Fn=$1

Sysdate= `date`

Fname= "zzz * *" $sysdate

Echo $fname > > $fn

Ps vg > > $fn

-

-- analyze_post_vg.sh--

-

Fn=$1

Cat $fn | grep-n zzz | sed's / / _ / g' | sed's pedigree / / _ / g' | sed's Universe /'> tmp.out

While read hh rq

Do

Hh_list=$hh_list "" $hh

Rq_list=$rq_list "" $rq

Done vg_$ {rq_ array[i]}. Trc

Fi

Done

Ls-l | grep vg.*trc | awk'{print $9}'> tmp.out

While read trcfile

Do

Trcfile_list=$trcfile_list "" $trcfile

Done

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report