Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 25102 Details for
Bug 40640
x11-plugins/wmcms does not show memory usage or swap usage with sys-kernel/gentoo-dev-sources-2.6.1-r1
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
diff of changes to make work (not exactly a patch)
diff.txt (text/plain), 1.27 KB, created by
Ivan Heffner
on 2004-02-06 13:29:59 UTC
(
hide
)
Description:
diff of changes to make work (not exactly a patch)
Filename:
MIME Type:
Creator:
Ivan Heffner
Created:
2004-02-06 13:29:59 UTC
Size:
1.27 KB
patch
obsolete
>*** state_linux.h Sun Sep 23 15:56:28 2001 >--- state_linux-2-6.h Fri Feb 6 13:19:54 2004 >*************** >*** 23,33 **** >--- 23,35 ---- > int cpu_idle; > > int mem_total; >+ int mem_free; > int mem_used; > int mem_buffers; > int mem_cached; > > int swap_total; >+ int swap_free; > int swap_used; > > void get_cpuinfo ( void ) >*************** >*** 42,47 **** > { > FILE *fp; > fp = fopen ( "/proc/meminfo", "r" ); >! fscanf ( fp, "%*s %*s %*s %*s %*s %*s %*s %d %d %*d %*d %d %d %*s %d %d", &mem_total, &mem_used, &mem_buffers, &mem_cached, &swap_total, &swap_used ); > fclose ( fp ); > } >--- 44,55 ---- > { > FILE *fp; > fp = fopen ( "/proc/meminfo", "r" ); >! /* The format of /proc/meminfo has changed with the 2.6 kernel; this new line will work for 2.6 -- idh >! fscanf ( fp, "%*s %*s %*s %*s %*s %*s %*s %d %d %*d %*d %d %d %*s %d %d", &mem_total, &mem_used, &mem_buffers, &mem_cached, &swap_total, &swap_used ); */ >! fscanf ( fp, "%*s %d %*s %*s %d %*s %*s %d %*s %*s %d %*s %*s %*d %*s %*s %*d %*s %*s %*d %*s %*s %*d %*s %*s %*d %*s %*s %*d %*s %*s %*d %*s %*s %d %*s %*s %d %*s", >! &mem_total, &mem_free, &mem_buffers, &mem_cached, &swap_total, &swap_free ); > fclose ( fp ); >+ >+ mem_used = mem_total - mem_free; >+ swap_used = swap_total - swap_free; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 40640
: 25102