Menu

Size of Swap In/Out

Help
2022-06-30
2022-07-20
  • Manabu Gomi

    Manabu Gomi - 2022-06-30

    collectl -sm --verbose tells Swap In/Out size, and I wonder if there may be
    wrong size format.

    I've compared collectl output with vmstat output.
    First line for example, vmstat says 32KB for swap in, but collectl says
    32"MB" for it.

    collectl outpu vmstat output
    <-----------Swap------------> | ---swap---
    Total Used Free In Out | si so
    7999M 5877M 2122M 32M 0 | 32 0
    7999M 5877M 2122M 64M 0 | 65 0
    7999M 5876M 2123M 368M 0 | 376 0
    7999M 5876M 2123M 0 0 | 0 0
    7999M 5876M 2123M 48M 0 | 49 0
    7999M 5876M 2123M 0 0 | 0 0
    7999M 5876M 2123M 384M 0 | 372 0

    I drilled down to format.ph, and found these line below.

    $line.=sprintf(" %5s %5s %5s %4s %4s %5s %5s %4s %4s",
    cvt($swapTotal,5,1,1), cvt($swapUsed,5,1,1),
    cvt($swapFree,5,1,1),
    cvt($swapin/$intSecs,5,1,1), cvt($swapout/$intSecs,5,1,1),
    cvt($pagefault/$intSecs,5), cvt($pagemajfault/$intSecs,5),
    cvt($pagein/$intSecs,4), cvt($pageout/$intSecs,4))
    if $memOpts eq '' ||

    unit for swapin and swapout are "byte", so I think
    cvt($swapin/$intSecs,5,0,1), cvt($swapout/$intSecs,5,0,1),♑
    might be right.

    Are there any comments ?

     
    • Mark Seger

      Mark Seger - 2022-06-30

      Try "collectl -- vmstat"
      Collectl collects the data and formats the output like vmstat. Should at
      least makes easier to look at the two tools side-by-side
      -mark

      On Thu, Jun 30, 2022, 2:45 AM Manabu Gomi aojs53@users.sourceforge.net
      wrote:

      collectl -sm --verbose tells Swap In/Out size, and I wonder if there may be
      wrong size format.

      I've compared collectl output with vmstat output.
      First line for example, vmstat says 32KB for swap in, but collectl says
      32"MB" for it.

      collectl outpu vmstat output
      <-----------Swap------------> | ---swap---
      Total Used Free In Out | si so
      7999M 5877M 2122M 32M 0 | 32 0
      7999M 5877M 2122M 64M 0 | 65 0
      7999M 5876M 2123M 368M 0 | 376 0
      7999M 5876M 2123M 0 0 | 0 0
      7999M 5876M 2123M 48M 0 | 49 0
      7999M 5876M 2123M 0 0 | 0 0
      7999M 5876M 2123M 384M 0 | 372 0

      I drilled down to format.ph, and found these line below.

      $line.=sprintf(" %5s %5s %5s %4s %4s %5s %5s %4s %4s",
      cvt($swapTotal,5,1,1), cvt($swapUsed,5,1,1),
      cvt($swapFree,5,1,1),
      cvt($swapin/$intSecs,5,1,1), cvt($swapout/$intSecs,5,1,1),
      cvt($pagefault/$intSecs,5), cvt($pagemajfault/$intSecs,5),
      cvt($pagein/$intSecs,4), cvt($pageout/$intSecs,4))
      if $memOpts eq '' ||

      unit for swapin and swapout are "byte", so I think
      cvt($swapin/$intSecs,5,0,1), cvt($swapout/$intSecs,5,0,1),♑
      might be right.

      Are there any comments ?

      Size of Swap In/Out
      https://sourceforge.net/p/collectl/discussion/696865/thread/767bbbae5d/?limit=25#d4d1


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/collectl/discussion/696865/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
  • Laurence Oberman

    Hello
    Only just saw this post.

    I will look into this and it merits a change I will patch it.
    Either way I will report back to this thread.

    Regards
    Laurence

     
  • Manabu Gomi

    Manabu Gomi - 2022-07-05

    Thank you for your comment !

    I tried collectl --vmstat and compared with vmstat -S k 1.
    For example when vmstat said "49" (means 49KB) for swapin, then collectl --vmstat said "49152" (means 49152 B).
    This results show vmstat and collectl have same value internally.
    So I wonder if collectl -sm --verbose have the bug to handle unit for swapin and swapout.

     
  • Manabu Gomi

    Manabu Gomi - 2022-07-05

    oh, I've missed reading message from Laurence and followed by Mark before I sent above.
    I appreciate your continued support.

     
  • Manabu Gomi

    Manabu Gomi - 2022-07-05

    oh, I've missed reading message from Laurence and followed by Mark before I sent above.
    I appreciate your continued support.

     
  • Laurence Oberman

    Apologies, I have been buried doing my day job. I intend to make time to investigate this later this week.
    Regards
    Laurence

     
  • Laurence Oberman

    Finally got around to this

    vmstat
    Swap
    si: Amount of memory swapped in from disk (/s).
    so: Amount of memory swapped to disk (/s).

    vmstat
    swap
    Time si so
    16:02:27 256 77996

    Collectl
    # <---Swap-->
    In Out
    16:02:27 256M 78G

    @Manabu, Thank you
    Something is not right, thanks for reporting this, I will decide how best to fix and patch it.
    Captured data if good, it's the playback that needs checking like you reported.

     

Log in to post a comment.