LinuxGem
此处为老的 LinuxGem,新版 LinuxGem 请移步 www.linuxgem.org

Memstat -- 查看共享库的内存占用

galeki posted @ 2008年10月22日 08:16 in Bash 和它的朋友们 with tags 内存 memstat , 5504 阅读

转自: http://debaday.debian.net/2008/10/19/memstat-identify-what-is-using-up-virtual-memory/

我们可以用 top 或者 系统管理器 这样的工具来查看各个进程的内存占用,不过内存中不光有你运行的进程,还驻留着进程需要的共享库,比如最基本的 libc.so。这些共享库在物理内存上只存在一份拷贝,而被多个进程共享。我们在 top 中查看进程信息的时候,会有 RSS 和 VSZ 两个项目,前者是进程本身的内存占用,而后者是算上共享库的总占用。

Memstat 这个小程序可以帮你查看每个共享库的内存占用,让他们现形。

直接运行 memstat -w 即可列出当前所有共享库的信息:

memstat -w

如果不加 -w 参数,memstat 会把过长的信息截断到 80 列。效果:

第一列为内存占用,随后是共享库的完整路径,最后的数字是使用这个共享库进程的 PID,可以看到,不少共享库后面有很多 PID,表示这个共享库被多个进程所共享。

你可以在 /etc/memstat.conf 中配置执行文件的目录,memstat 只会调查这些目录下的可执行文件共享库信息。

如果你想查看那个共享库占用的内存最多,只需要用 sort 过滤一下:

memstat -w | sort -rn

即可~

Memstat 在 Debian 和 Ubuntu 中都有,不过我没找到他的主页,如果你的软件仓库中没有 memstat,可以在本地下载,这个包是通过 deb2targz 转过来的。

  • 无匹配
shili 说:
2008年10月25日 14:05

不知道干啥用

Robinjack 说:
2020年12月28日 00:21

It really is perfect time to make several plans for the future and it is time to be happy. I’ve read this post and if I could I desire to recommend you few useful points or advice. Maybe you can publish next articles referring to this post. I want to read more things about it! bed bugs

안전놀이터 说:
2021年1月17日 19:49

Hiya, I’m really glad I’ve found this information. Nowadays bloggers publish just about gossips and net and this is actually irritating. A good blog with interesting content, this is what I need. Thank you for keeping this website, I’ll be visiting it. Do you do newsletters? Can not find it.

Robinjack 说:
2021年1月29日 23:02

As I web-site possessor I believe the content matter here is rattling wonderful , appreciate it for your efforts. You should keep it up forever! Best of luck. CEO Ross Levinsohn

Robinjack 说:
2021年2月01日 20:51

You certainly know what youre talking about. Man, this web site is simply great! I cant wait to read much more of what youve have got to say. Im really happy that we discovered this after i did because I used to be really starting to get bored using the whole blogging scene. Youve turned me around, man! Maven CEO interview

Molekule Review 说:
2021年2月12日 02:10

Largest lover messages were made to share it with your and gives honour of the bride and groom. Very sound systems facing unnecessary throngs of people should take into account each of our valuable concept of all presenting, which is one’s trailer. best man toasts

Robinjack 说:
2021年2月15日 20:02

I appreciate your work , thanks for all the informative blog posts. nürnberg schlüsseldienst

Robinjack 说:
2021年2月17日 00:28

I truly appreciated this wonderful blog. Make sure you keep up the good work. All the best !!!! slidell insurance companies

agen s1288 说:
2021年2月21日 13:38

I’ve read some good stuff here. Definitely worth bookmarking for revisiting.

daftar slot online 说:
2021年2月21日 13:39

very nice post, i undoubtedly adore this amazing site, continue it

agen slot online 说:
2021年2月28日 18:42

Woh I like your posts , saved to fav! .

voyance gratuite par 说:
2021年3月05日 21:04

I’m new to your blog and i really appreciate the nice posts and great layout.;,;.*

rats issues 说:
2021年3月09日 19:44

hi, I’m having bad luck attempting to rank high for the words “victorias secret coupon codes”… Please approve my comment!!

fdfd 说:
2021年3月12日 23:05

More often than not I don't make remarks on sites, yet I'd like to say this article truly constrained me to do as such. Truly pleasant post!  DMT for sale

amelia 说:
2021年3月14日 22:51

Hello. I discovered your site utilizing msn. This is an exceptionally elegantly composed article. I'll make certain to bookmark it and return to peruse a greater amount of your helpful data. A debt of gratitude is in order for the post. I'll unquestionably return.  online wholesale marketplace

amelia 说:
2021年3月16日 04:33

Thankyou for this wondrous post, I am happy I watched this site on yippee.  buy wholesale makeup to sell

amelia 说:
2021年3月17日 04:16

The data you have posted is extremely helpful. The locales you have alluded was great. A debt of gratitude is in order for sharing..  먹튀

amelia 说:
2021年3月18日 06:39

This is my first time visit here. From the huge amounts of remarks on your articles,I surmise I am not just one having all the pleasure right here!  wholesale rustic home decor

amelia 说:
2021年3月18日 06:39

Extraordinary Article it its truly enlightening and creative update us as often as possible with new upgrades. its was truly important. much obliged.  wholesale designer sunglasses

amelia 说:
2021年3月18日 06:39

I truly like your interpretation of the issue. I now have an unmistakable thought on what this matter is about..  carpet suppliers

amelia 说:
2021年3月18日 06:39

I havent any word to welcome this post.....Really i am awed from this post....the individual who make this post it was an awesome human..thanks for imparted this to us.  watch liquidators

amelia 说:
2021年3月18日 06:39

Thank you for such a well written article.  It’s full of insightful information and entertaining descriptions.  Your point of view is the best among many. clothing manufacturers for startups

gas station heroin 说:
2021年3月19日 18:08

An impressive share, I merely given this onto a colleague who had been doing a little analysis within this.

<a href="https://getheroin.net/">opioids drugs</a>
<a href="https://getheroin.net/">gas station heroin</a>
<a href="https://getheroin.net/product-category/gas-station-heroin/">is heroin an opioid</a>
<a href="https://getheroin.net/product/heroin/">black tar heroin</a>
<a href="https://getheroin.net/product-category/black-tar-heroin/">heroin</a>
<a href="https://getheroin.net/product/gas-station-heroin/">columbia professor heroin</a>

Powder free nitrile 说:
2021年3月19日 18:08

but yeah Thnkx for spending some time to go over this, I am strongly regarding this and really like reading more about this topic.

<a href="https://qualitynitrilegloves.com/">Powder free nitrile gloves</a>
<a href="https://qualitynitrilegloves.com/product-category/">powder-free-nitrile-gloves/</a>
<a href="https://qualitynitrilegloves.com/product/">aurelia-nitrile-gloves/</a>
<a href="https://qualitynitrilegloves.com/">vinyl-mechanics-gloves/</a>
<a href="https://qualitynitrilegloves.com/product/">blue-nitrile-gloves-large/</a>
<a href="https://qualitynitrilegloves.com/product/">plastic-or-latex-gloves/</a>
<a href="https://qualitynitrilegloves.com/product/">clear-vinyl-gloves/</a>
<a href="https://qualitynitrilegloves.com/product/">ammex-black-nitrile-gloves/</a>
<a href="https://qualitynitrilegloves.com/product/g">green-nitrile-exam-gloves/</a>
<a href="https://qualitynitrilegloves.com/product/">ldpe-gloves/</a>
<a href="https://qualitynitrilegloves.com/product/">medpride-nitrile-gloves/</a>
<a href="https://qualitynitrilegloves.com/product/">ambitex-nitrile-gloves/</a>
<a href="https://qualitynitrilegloves.com/product/">latex-gloves-wholesale/</a>
<a href="https://qualitynitrilegloves.com/product/">safeguard-nitrile-gloves/</a>
<a href="https://qualitynitrilegloves.com/product/">white-nitrile-exam-gloves/</a>

amelia 说:
2021年3月20日 04:57

Great article Lot's of information to Read...Great Man Keep Posting and update to People..Thanks scrap car removal langley

amelia 说:
2021年3月23日 20:18

Hi, I have perused a large portion of your posts. This post is likely where I got the most valuable data for my exploration. A debt of gratitude is in order for posting, perhaps we can see more on this. Are you mindful of whatever other sites on this subject.  https://www.home.woodworkingnetwork.com/plant-production-software-services/air-handling-systems-equipment-0

amelia 说:
2021年3月30日 23:44

A debt of gratitude is in order For sharing this Superb article.I utilize this Article to demonstrate my task in college.it is valuable For me Great Work.  https://sites.google.com/view/milanovaajade/blog/%E0%B8%A3%E0%B8%A7%E0%B8%A7-ufaslot

UMAIR 说:
2021年4月01日 15:17

P LAWCET 2021 will be conducted by the Shri Krishnadevaraya university, Anantapur on the behalf of APSCHE, Hyderabad. Andhra Pradesh Law Common Entrance Test (AP LAWCET) examination is a state level examination. This AP LAWCET Schedule 2021,examination is conducted one time every year. Through this exam candidates can get admission in 3 and 5 year law courses. In this article candidates cam check complete details about the AP LAWCET 2021 including dates, application form, eligibility etc.

amelia 说:
2021年4月04日 06:35

XERPA is a Business SaaS that provides all the tools a business person needs to grow and automate his/her business email marketing

maxbet 说:
2021年4月06日 21:54

You should experience a tournament for one of the greatest blogs online. I most certainly will recommend this site!

amelia 说:
2021年4月10日 05:38

Pleasant to be going by your website afresh, it has been months for me. Well this article ive been sat tight for accordingly long. i need this article to complete my task inside of the personnel, and it has same subject together with your article. Much appreciated, decent share.  รีวิวUFA365

amelia 说:
2021年4月11日 04:00

These are some incredible apparatuses that i unquestionably use for SEO work. This is an awesome rundown to use later on..  รีวิวufa800

chalsea 说:
2021年4月14日 21:17

I might want to thank you for the endeavors you have made in composing this article. I am trusting the same best work from you later on also. Much appreciated...  Order cannabis online

chalsea 说:
2021年4月14日 21:17

This is an awesome rousing article.I am practically satisfied with your great work.You put truly exceptionally supportive data. Keep it up. Continue blogging. Hoping to perusing your next post.  Get prescribed online

chalsea 说:
2021年4月14日 21:17

I adore this site!! The blaze up the top is great!!  PHARMACY PRODUCTS

daniyalabbas212@gami 说:
2021年4月19日 05:53

although we see that pdf is converted into png but do not see the vice versa of it. This thing has been done with ease by https://de.altoconvertpdftoexcel.com/reviewsreviews. They are highly reliable and very cheap as well.

Robinjack 说:
2021年4月24日 20:15

Hmm it looks like your blog ate my first comment (it was super long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog. I as well am an aspiring blog writer but I’m still new to the whole thing. Do you have any tips for novice blog writers? I’d genuinely appreciate it. Monthly Income Review

daniyalabbas212@gami 说:
2021年5月02日 15:22

if you want to use Electronic Signatures for Successful Workflow Development then visit https://www.viw.com.au/index.php/news/technology/30181-electronic-signatures-for-successful-workflow-development to learn how to do it. https://www.viw.com.au/index.php/news/technology/30181-electronic-signatures-for-successful-workflow-development

chalsea 说:
2021年5月03日 20:02

nice post, keep up with this interesting work. It really is good to know that this topic is being covered also on this web site so cheers for taking time to discuss this! articleWebsite

WWW 说:
2021年5月18日 14:34

hello!,I like your writing so a lot! proportion we keep in touch more approximately your article on AOL? I require a specialist in this space to unravel my problem. May be that’s you! Looking ahead to peer you.sbobet casino

amelia 说:
2021年5月21日 18:44

Incredible post I might want to thank you for the endeavors you have made in composing this fascinating and learned article.  https aka ms remoteconnect microsoft

WWW 说:
2021年5月23日 15:15

Remarkably! It is as if you read my mind! A person appear to know therefore considerably relating to this, just like you authored the book inside it or something. I feel that you can do with a few images to drive the content residence a bit, on top of that, this really is great weblog. The outstanding study. I will definitely review again.Minecraft Server List

buy vintage clothing 说:
2021年5月26日 13:37

As soon as I discovered this internet site I went on reddit to share some of the love with them.

ch 说:
2021年5月29日 04:23

Thanks for the valuable information and insights you have so provided here... click here

laim 说:
2021年6月06日 02:38

Superior post, keep up with this exceptional work. It's nice to know that this topic is being also covered on this web site so cheers for taking the time to discuss this! Thanks again and again!cialis in pakistan

laim 说:
2021年6月08日 06:00

Easily this page will probably irrefutably possibly be well known involving many blogs persons, car without any conscientious articles or blog posts or maybe opinions.vigrx plus tablets

WWW 说:
2021年6月13日 14:23

I am glad to be one of many visitors on this outstanding web site (:, thankyou for putting up.visit this page

laim 说:
2021年6月15日 02:00

I think that thanks for the valuabe information and insights you have so provided here.Ju-tex.con is an E-Commence platform

WWW 说:
2021年6月16日 19:02

What would most of us do devoid of the brilliant suggestions you talk about on this blog? Who else has the fortitude to deal with vital topics with regard to common visitors like me? I actually and my girlfriends are very fortunate to have your website among the ones we typically visit. Hopefully you know how significantly we love your efforts! Best wishes through us all.https://hytec.wildapricot.org/

Robinjack 说:
2021年7月01日 18:38

Awesome post , I am going to spend more time researching this topic How to Gain Baccarat

WWW 说:
2021年7月18日 20:18

I admire your piece of work, thankyou for all the informative content .http://www.aipeople.com.cn/home.php?mod=space&uid=1155479

ch 说:
2021年7月19日 06:59

This online journal is so decent to me. I will continue coming here over and over. Visit my connection also..  Student Freelance

WWW 说:
2021年7月27日 18:16

I merely included your online web page for you to my book marks. I like studying your site content. Thank you!https://themehunt.com/profile/togel338

Mardin Escort 说:
2021年7月28日 01:45

I would also motivate just about every person to save this web page for any favorite assistance to assist posted the appearance.

forex market 说:
2023年8月16日 16:00

hello!,I like your writing very so much! percentage we be in contact more about your article on AOL? I require an expert on this area to solve my problem. Maybe that’s you! Having a look ahead to look you. puppy curtains

haider 说:
2023年8月19日 20:33

The next time I just read a blog, I hope which it doesnt disappoint me just as much as brussels. After all, It was my replacement for read, but I actually thought youd have something interesting to talk about. All I hear can be a number of whining about something that you could fix in the event you werent too busy trying to find attention. BLACKHORN 209 POWDER

forex market 说:
2023年8月20日 18:59

An fascinating discussion is worth comment. I believe that you can write more on this topic, it might not become a taboo subject but typically people are inadequate to communicate in on such topics. Yet another. Cheers UFABETแทงบอลบนมือถือ

haider 说:
2023年8月21日 16:39

Spot on with this write-up, I truly believe this site requirements additional consideration. I’ll likely to end up again to see additional, thank you for that info. แทงใบเหลืองใบแดงUFABET

forex market 说:
2023年8月21日 22:12

Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You definitely know what youre talking about, why waste your intelligence on just posting videos to your site when you could be giving us something informative to read? Miss feather hair extensions UFABETแทงบอลทายผลผู้ชนะ

haider 说:
2023年8月22日 22:56

informatii interesante si utile postate pe blogul dumneavoastra. dar ca si o paranteza , ce parere aveti de inchiriere vile vacanta ?. https://www.outlookindia.com/outlook-spotlight/liv-pure-reviews-what-they-ll-never-tell-you-does-livpure-really-work--news-311512

forex market 说:
2023年8月23日 20:43

Excellent post. I was checking constantly this blog and I am impressed! Very helpful information specifically the last part I care for such information much. I was looking for this particular information for a very long time. Thank you and best of luck. 안전놀이터

haider 说:
2023年8月23日 21:39

We would like to thank you just as before for the stunning ideas you offered Jesse when preparing her own post-graduate research and, most importantly, regarding providing every one of the ideas in one blog post. In case we had been aware of your web page a year ago, we might have been saved the unwanted measures we were implementing. Thank you very much. เว็บพนันบอลออนไลน์อันดับ1

forex market 说:
2023年8月24日 16:33

I’d have to consult with you here. Which isn’t some thing Which i do! I love to reading an article that may get people to believe. Also, many thanks for allowing me to comment! UFABET เว็บพนันแตกง่าย

haider 说:
2023年8月24日 18:12

This is a terrific web site, could you be interested in doing an interview regarding how you designed it? If so e-mail me! เว็บบอลออนไลน์UFA

haider 说:
2023年8月25日 01:00

Augustine thanks for sharing this! My extensive google search has now been recently paid for using quality insight to talk about together with our relatives. สมัครแทงบอลฟรี

forex market 说:
2023年8月25日 01:17

excellent points altogether, you just gained a new reader. What would you recommend about your post that you made some days ago? Any positive? เว็บไซต์แทงบอลอันดับ1

forex market 说:
2023年8月25日 23:37

I have been absent for some time, but now I remember why I used to love this blog. Thanks , I will try and check back more often. How frequently you update your web site? เว็บพนันออนไลน์UFA

haider 说:
2023年8月27日 17:42

I discovered your blog website on google and verify a couple of of your early posts. Proceed to maintain up the superb operate. I just further up your RSS feed to my MSN Information Reader. Seeking forward to reading extra from you in a while!… 메이저사이트

haider 说:
2023年8月30日 16:20

Whoa! This blog looks just like my old one! It’s on a totally different topic but it has pretty much the same page layout and design. Wonderful choice of colors! 메이저사이트

haider 说:
2023年9月03日 19:26

Your article always possess much of really up to date info. Where do you come up with this? Just stating you are very innovative. Thanks again 안전놀이터

forex market 说:
2023年9月04日 23:59

I have been browsing on-line greater than three hours lately, yet I by no means found any attention-grabbing article like yours. It is beautiful worth enough for me. Personally, if all website owners and bloggers made just right content as you probably did, the web will be much more helpful than ever before. salingsilang

sdsds 说:
2023年9月08日 21:15

Your blog site is so interesting … keep up the good work! Also, is your wordpress theme a free one? and if so..can i have it? My best wishes, Joanne. hawaii camo

haider 说:
2023年9月08日 22:13

I just couldn’t depart your web site before suggesting that I really loved the usual info an individual provide in your visitors? Is going to be back incessantly in order to check out new posts filmyzilla 2023

haider 说:
2023年9月14日 20:56

I thought I would leave my first comment. I don’t know what to say except that I have enjoyed reading. Nice blog. I will keep visiting. สล็อต

haider 说:
2023年9月20日 00:13

Great wordpress blog here.. It’s hard to find quality writing like yours these days. I really appreciate people like you! take care birthday crocs

haider 说:
2023年9月23日 15:44

I discovered your blog site on google and appearance a couple of your early posts. Maintain the great operate. I recently additional your Feed to my MSN News Reader. Seeking forward to reading a lot more within you down the line!… roof cleaning southampton

jmaes 说:
2023年9月24日 00:58

You need to participate in a contest for probably the greatest blogs on the web. I will suggest this website! shillong teer common number

jmaes 说:
2023年10月02日 22:34

Nice post. I study one thing more challenging on totally different blogs everyday. It’s going to at all times be stimulating to read content material from other writers and apply a little something from their store. I’d want to use some with the content material on my weblog whether you don’t mind. Natually I’ll provide you with a link on your net blog. Thanks for sharing. Kalaastar song lyrics

james 说:
2023年10月06日 18:15

Howdy, i scan your blog occasionally and that i own a similar one and i was simply wondering if you get plenty of spam comments? If therefore how do you forestall it, any plugin or something you’ll be able to advise? i buy such a lot lately its driving me mad therefore any assistance is very much appreciated. mens shrek crocs

ds 说:
2023年10月08日 15:42

James Mangold’s filmography currently covers a wide range of genres, and this experience had benefited him since Knight and Day contains plenty all rolled into one, with action, comedy, science fiction and even serious drama all included. how do I recover my funds?

ds 说:
2023年10月12日 17:05

Howdy! Quick question that’s entirely off topic. Do you know how to make your site mobile friendly? My web site looks weird when browsing from my apple iphone. I’m trying to find a theme or plugin that might be able to correct this problem. If you have any recommendations, please share. Thank you! Roof Cleaning Southampton

ds 说:
2023年10月14日 00:14

I’ve been exploring for a bit for any high-quality articles or blog posts on this sort of area . Exploring in Yahoo I at last stumbled upon this website. Reading this information So i am happy to convey that I have an incredibly good uncanny feeling I discovered just what I needed. I most certainly will make sure to don’t forget this website and give it a glance regularly. transparent training bra

ds 说:
2023年10月21日 00:12

You need to participate in a contest for probably the greatest blogs on the web. I will suggest this website! แทงบอลเงินสด

Dave 说:
2023年10月26日 01:17

I have a hard time describing my thoughts on content, but I really felt I should here. Your article is really great. I like the way you wrote this information. bitcoin cracker tool

james 说:
2023年10月31日 15:13

The main reason why it's always a lot better that one can significant researching preceding doing. You'll be able to share improved page using this method. 1xbet промокод 2024

wallpaper singapore 说:
2023年11月02日 03:08

Thank you for helping people get the information they need. Great stuff as usual. Keep up the great work!!! Sajta de Pollo

Dav 说:
2023年11月06日 00:38

I am very much pleased with the contents you have mentioned. I wanted to thank you for this great article. wallpaper singapore

james 说:
2023年11月07日 21:10

I’d should check with you here. Which isn’t some thing I do! I like reading a post which will make people believe. Also, thank you permitting me to comment! digitalglobaltimes.com

Dave 说:
2023年11月13日 21:04

The attention to detail in the packaging reflects the quality of the pencils. natraj pencil packing job

Dave 说:
2023年11月16日 20:17

Positive site, where did u come up with the information on this posting? I'm pleased I discovered it though, ill be checking back soon to find out what additional posts you include. temazepam kopen in belgië

Dave 说:
2023年12月22日 18:12

You have a good point here!I totally agree with what you have said!!Thanks for sharing your views...hope more people will read this article!!! roket288

Dave 说:
2023年12月24日 14:43

I really thank you for the valuable info on this great subject and look forward to more great posts. Thanks a lot for enjoying this beauty article with me. I am appreciating it very much! Looking forward to another great article. Good luck to the author! All the best! regisztrált jogosítvány vásárlás

Dave 说:
2024年1月07日 14:59

Thank you so much for the post you do. I like your post and all you share with us is up to date and quite informative, i would like to bookmark the page so i can come here again to read you, as you have done a wonderful job. köpa cannabis online

Dave 说:
2024年2月09日 12:58

Positive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work. köpa cannabis online


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter