By itself, "memsize" would just tell you how much ram was installed (or technically, in use by the kernel as you could reduce that with athe "mem" boot option), but if you gave it additional arguments as described below, it could read from a kernel dump.
As it returned 0 for success, that could tell you if a dump was valid as shown here.
From: Roberto Zini <r.zini@strhold.it> Newsgroups: comp.unix.sco.misc Subject: Re: How to clean /dev/swap (OSR 5.06) Date: Thu, 06 Sep 2001 18:01:55 +0200 Message-ID: <3B979DF3.BE1F79C1@strhold.it> References: <3B9476A3.8835CB55@club-internet.fr>
<3B95D0ED.79C438B9@strhold.it>
<3B963B62.2B6850F4@club-internet.fr> Fr�d�ric STOCK wrote: > > Hello Roberto, > > the swap device is still in /dev/ dir. > here it is the output of the divvy command: > [snip]
Good; what does "swap -l" report ? According to /etc/dumpsave, there's a valid system dump if "/etc/memsize /dev/swap <swaplo> <blocks>" returns an exit status of 2, where <swaplo> and <blocks> are the values returned by "swap -l". I've just did it un a running 5.0.5 system and I've got an "memsize: Invalid checksum" message (return code = 2) which indicates that there isn't a valid system dump; if the return value is "0", then you have a valid dump. Dunno about other return values; however, if you take a look at the /etc/dumpsave script, the "remove_dump_exit" routine shows how to remove the dump from the swap area. Take the <swaplo> number as reported by "swap -l", add 4, and issue the following command: dd if=/dev/swap of=/dev/swap iseek=<number> oseek=<number> count=2 conv=swab where <number> is the number you get from the above sum and "/dev/swap" is your swap device.
I've just tried it on a living 5.0.5 system and it was harmless;
cannot guarantee that it'll be the same on yours though ...
Hope it helps !
Best,
Roberto
--
---------------------------------------------------------------------
Roberto Zini email : r.zini@strhold.it
Technical Support Manager -- Strhold Evolution Division R.E. (ITALY)
---------------------------------------------------------------------
"Has anybody around here seen an aircraft carrier?"
(Pete "Maverick" Mitchell - Top Gun)
More Articles by Tony Lawrence
Have you tried Searching this site?
Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.
Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.
Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.
We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.
Click here to add your comments
Don't miss responses! Subscribe to Comments by RSS or by Email
Click here to add your comments
If you want a picture to show with your comment, go get a Gravatar