FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Crash Utility

 
 
LinkBack Thread Tools
 
Old 04-07-2010, 12:01 PM
Sharyathi Nagesh
 
Default Fixing swap command

Description
Sub-command "swap" in crash command doesn't show any info about swap
partition in kernel versions 2.6.28 and above

crash> swap
FILENAME TYPE SIZE USED PCT PRIORITY
crash> q
feastlp4:~ #



Analysis
Swap specific information comes from the kernel data structure
swap_info_struct
.The problem starts when it access the fields of swap_info_struct.
In this case
----------------------
flags = INT(vt->swap_info_struct +
OFFSET(swap_info_struct_flags));

if (!(flags & SWP_USED))
continue; <== Hits this case
----------------------
flags gets value '0' and hence it returns with out calculating swap values

This is happening because post 2.6.28 (precisely commit:
ebebbbe904634b0ca1c674457b399f68db5e05b1) changes flag field in
swap_info_struct from 'int' to 'unsigned long'. flags always gets zero
and jumps further calculation.



Fix
Patch has been attached to this mail
Thanks
Sharyathi
--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 04-07-2010, 12:33 PM
Dave Anderson
 
Default Fixing swap command

----- "Sharyathi Nagesh" <sharyath@in.ibm.com> wrote:

> Description
> Sub-command "swap" in crash command doesn't show any info about swap
> partition in kernel versions 2.6.28 and above
>
> crash> swap
> FILENAME TYPE SIZE USED PCT PRIORITY
> crash> q
> feastlp4:~ #

Yes, I was already aware of that issue (big-endian only), and have a
patch queued for 5.0.3:

- Fix for "swap" and "kmem -i" commands on 2.6.29 or later, big-endian,
ppc64 kernels, where the swap_info_struct.flags member was changed
from an int to a long. Without the patch, the "swap" command does
not display any swap data, and the "kmem -i" command indicates that
there is no swap memory used or available.
(anderson@redhat.com)

Thanks,
Dave
--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 

Thread Tools




All times are GMT. The time now is 06:16 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org