#180 lxtask sorts incorrectly by rss and vm-size

None
closed-fixed
lxtask (21)
5
2014-09-23
2010-02-16
Kyron Basu
No

When sorting by RSS or VM-Size, lxtask ignores the unit (KB, MB, etc.) and orders by the value of the numerical part alone. Additionally, it ignores any fractional component, so sizes with equal integer components (eg. 1.5 MB, 1.9 MB, 1.1 MB) are frequently listed out of order.

I believe this is because of the compare_int_list_item function in interfaces.c used for comparing the items.

The attached patch corrects this behaviour by adding a new compare_mem_list_item function, but I am new to coding and have never tried to fix a bug before, so I do not know if this is a good solution.

Discussion

  • Kyron Basu
    Kyron Basu
    2010-02-16

    Patch to fix sorting by rss and vm-size

     
    Attachments
    • labels: --> lxtask
     
  • Fixed by commit 13bcb2f580fc329ba5a887d7dead7536f3d60c95 (dgod, 25 March 2010, "sort the RSS by the real size"). Kyron Basu, thank you for your contribution.

     
  • xgdgsc
    xgdgsc
    2013-08-15

    I still have this problem with git version. Especially processes with larger than 2 GB are sorted to the bottom under those processes of 0 byte.

     
  • dgod.osa
    dgod.osa
    2013-08-21

    check the git version, 2GB problem may fixed

     
  • I believe this issue is completely fixed in recently released version of LXTask (0.1.5). Check it and if something still wrong then leave a comment to reopen the request, please. Thank you very much.

     
    • status: open --> closed-fixed
    • assigned_to: Lonely Stranger
    • Group: -->