From: howa on
Hi

How to know if my linux is currently using swap or not, e.g.

Top:

Mem: 4041528k total, 3988108k used, 53420k free, 87912k
buffers
Swap: 2048248k total, 29364k used, 2018884k free, 2359168k
cached

If it is not currently using swap, how to check if it hit the swap
frequency?

Thanks.
From: Andrew Halliwell on
howa <howachen(a)gmail.com> wrote:
> Hi
>
> How to know if my linux is currently using swap or not, e.g.
>
> Top:
>
> Mem: 4041528k total, 3988108k used, 53420k free, 87912k
> buffers
> Swap: 2048248k total, 29364k used, 2018884k free, 2359168k
> cached

Says there. 29365k used. That's swap.

>
> If it is not currently using swap, how to check if it hit the swap
> frequency?

frequency? Did you mean recently?
Dunno, I'm sure there're a few system monitoring and stat collection tools
out there that might be able to tell you, like sar, I think... But if you've
not got any of that stuff running at the time, I think you can only look at
current swap usage as a snapshot, not review how it was used in the past.

Swap's nothing to worry about. Programs that're running but haven't been
used for a time end up being swapped out to make the system RAM available
for file caching and buffering. It's more use than just sitting there
holding a program that's not being used.
--
| spike1(a)freenet.co.uk | |
| Andrew Halliwell BSc | "The day Microsoft makes something that doesn't |
| in | suck is probably the day they start making |
| Computer science | vacuum cleaners" - Ernst Jan Plugge |
From: The Natural Philosopher on
Andrew Halliwell wrote:
> howa <howachen(a)gmail.com> wrote:
>> Hi
>>
>> How to know if my linux is currently using swap or not, e.g.
>>
>> Top:
>>
>> Mem: 4041528k total, 3988108k used, 53420k free, 87912k
>> buffers
>> Swap: 2048248k total, 29364k used, 2018884k free, 2359168k
>> cached
>
> Says there. 29365k used. That's swap.
>
>> If it is not currently using swap, how to check if it hit the swap
>> frequency?
>
> frequency? Did you mean recently?
> Dunno, I'm sure there're a few system monitoring and stat collection tools
> out there that might be able to tell you, like sar, I think... But if you've
> not got any of that stuff running at the time, I think you can only look at
> current swap usage as a snapshot, not review how it was used in the past.
>
> Swap's nothing to worry about. Programs that're running but haven't been
> used for a time end up being swapped out to make the system RAM available
> for file caching and buffering. It's more use than just sitting there
> holding a program that's not being used.

yeah..its page out *rates* that you need to watch: if that starts
becoming routine, you have more ACTIVE programs than RAM to fit them in.

From: howa on
Hi

On 6$B7n(B23$BF|(B, $B2<8a(B6$B;~(B08$BJ,(B, Andrew Halliwell <spi...(a)ponder.sky.com> wrote:
> Swap's nothing to worry about. Programs that're running but haven't been
> used for a time end up being swapped out to make the system RAM available
> for file caching and buffering. It's more use than just sitting there
> holding a program that's not being used.
> --

so are there anyway to know how many active memory in use by all
running process?

Thanks.
From: Andrew Halliwell on
howa <howachen(a)gmail.com> wrote:
> Hi
>
> On 6???23???, ??????6???08???, Andrew Halliwell <spi...(a)ponder.sky.com> wrote:
>> Swap's nothing to worry about. Programs that're running but haven't been
>> used for a time end up being swapped out to make the system RAM available
>> for file caching and buffering. It's more use than just sitting there
>> holding a program that's not being used.
>> --
>
> so are there anyway to know how many active memory in use by all
> running process?

ps
That can show all running processes, their memory usage as a number and a
percentage, cpu usage and other things, like cpu time used, walltime, etc.

Also
top
which constantly updates (but only shows the top processes, along with
free and cpu stats and uptime, but you can switch between top memory users
and top cpu users)
--
| spike1(a)freenet.co,uk | "Are you pondering what I'm pondering Pinky?" |
| Andrew Halliwell BSc | |
| in | "I think so brain, but this time, you control |
| Computer Science | the Encounter suit, and I'll do the voice..." |