View swap usage in kb using top command





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















I want to find swap used by each interior thread. I used top to view all the running processes and used shift+h(H) to view all threads and I used shift+o(O) with option p to view swap used by each individual thread, and I got the swap used by each individual thread in GB size. But I need to view the swap size used by each individual thread in KB size. Please anyone help on this



Pasting here my top command process



PID  USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  SWAP COMMAND                                                                                                                                                                    
9959 root 20 0 147g 116g 4676 S 0.0 96.8 0:13.28 21g mysqld
9969 root 20 0 147g 116g 4676 S 0.0 96.8 0:10.19 21g mysqld
9970 root 20 0 147g 116g 4676 S 0.0 96.8 0:12.96 21g mysqld
9971 root 20 0 147g 116g 4676 S 0.0 96.8 5:21.34 21g mysqld
9972 root 20 0 147g 116g 4676 S 0.0 96.8 5:27.05 21g mysqld
9973 root 20 0 147g 116g 4676 S 0.0 96.8 5:22.58 21g mysqld
9974 root 20 0 147g 116g 4676 S 0.0 96.8 5:27.03 21g mysqld
9975 root 20 0 147g 116g 4676 S 0.0 96.8 5:49.48 21g mysqld
9976 root 20 0 147g 116g 4676 S 0.0 96.8 5:03.59 21g mysqld
9977 root 20 0 147g 116g 4676 S 0.0 96.8 4:55.42 21g mysqld
9978 root 20 0 147g 116g 4676 S 0.0 96.8 5:03.10 21g mysqld
9986 root 20 0 147g 116g 4676 S 0.0 96.8 0:05.23 21g mysqld
9987 root 20 0 147g 116g 4676 S 0.3 96.8 1:57.07 21g mysqld
9988 root 20 0 147g 116g 4676 S 0.0 96.8 0:01.15 21g mysqld
9989 root 20 0 147g 116g 4676 S 0.0 96.8 5:55.10 21g mysqld
9990 root 20 0 147g 116g 4676 S 1.0 96.8 73:50.11 21g mysqld
9991 root 20 0 147g 116g 4676 S 3.6 96.8 241:03.15 21g mysqld
9992 root 20 0 147g 116g 4676 S 0.0 96.8 0:18.20 21g mysqld
9993 root 20 0 147g 116g 4676 S 0.0 96.8 0:03.38 21g mysqld
9994 root 20 0 147g 116g 4676 S 0.0 96.8 0:01.14 21g mysqld
9995 root 20 0 147g 116g 4676 S 0.0 96.8 0:00.00 21g mysqld
9999 root 20 0 147g 116g 4676 S 0.0 96.8 34:12.34 21g mysqld
10058 root 20 0 147g 116g 4676 S 0.0 96.8 8:19.05 21g mysqld
10061 root 20 0 147g 116g 4676 S 0.0 96.8 9:21.93 21g mysqld
10082 root 20 0 147g 116g 4676 S 0.0 96.8 3:46.24 21g mysqld
10086 root 20 0 147g 116g 4676 S 0.0 96.8 17:18.62 21g mysqld
10153 root 20 0 147g 116g 4676 S 0.0 96.8 36:55.88 21g mysqld
10154 root 20 0 147g 116g 4676 S 0.0 96.8 16:27.58 21g mysqld
10156 root 20 0 147g 116g 4676 S 0.0 96.8 12:12.73 21g mysqld
10157 root 20 0 147g 116g 4676 S 0.7 96.8 12:26.13 21g mysqld
10158 root 20 0 147g 116g 4676 S 0.0 96.8 18:10.38 21g mysqld
10163 root 20 0 147g 116g 4676 S 0.0 96.8 2:28.14 21g mysqld
10201 root 20 0 147g 116g 4676 S 0.0 96.8 16:45.92 21g mysqld


Above provided output is what I got on top command where SWAP is displayed in GB I want it to be displayed in KB










share|improve this question























  • possible duplicate of How to force 'top' to show human readable values for %MEM RES and VIRT

    – muru
    Nov 19 '14 at 8:52


















0















I want to find swap used by each interior thread. I used top to view all the running processes and used shift+h(H) to view all threads and I used shift+o(O) with option p to view swap used by each individual thread, and I got the swap used by each individual thread in GB size. But I need to view the swap size used by each individual thread in KB size. Please anyone help on this



Pasting here my top command process



PID  USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  SWAP COMMAND                                                                                                                                                                    
9959 root 20 0 147g 116g 4676 S 0.0 96.8 0:13.28 21g mysqld
9969 root 20 0 147g 116g 4676 S 0.0 96.8 0:10.19 21g mysqld
9970 root 20 0 147g 116g 4676 S 0.0 96.8 0:12.96 21g mysqld
9971 root 20 0 147g 116g 4676 S 0.0 96.8 5:21.34 21g mysqld
9972 root 20 0 147g 116g 4676 S 0.0 96.8 5:27.05 21g mysqld
9973 root 20 0 147g 116g 4676 S 0.0 96.8 5:22.58 21g mysqld
9974 root 20 0 147g 116g 4676 S 0.0 96.8 5:27.03 21g mysqld
9975 root 20 0 147g 116g 4676 S 0.0 96.8 5:49.48 21g mysqld
9976 root 20 0 147g 116g 4676 S 0.0 96.8 5:03.59 21g mysqld
9977 root 20 0 147g 116g 4676 S 0.0 96.8 4:55.42 21g mysqld
9978 root 20 0 147g 116g 4676 S 0.0 96.8 5:03.10 21g mysqld
9986 root 20 0 147g 116g 4676 S 0.0 96.8 0:05.23 21g mysqld
9987 root 20 0 147g 116g 4676 S 0.3 96.8 1:57.07 21g mysqld
9988 root 20 0 147g 116g 4676 S 0.0 96.8 0:01.15 21g mysqld
9989 root 20 0 147g 116g 4676 S 0.0 96.8 5:55.10 21g mysqld
9990 root 20 0 147g 116g 4676 S 1.0 96.8 73:50.11 21g mysqld
9991 root 20 0 147g 116g 4676 S 3.6 96.8 241:03.15 21g mysqld
9992 root 20 0 147g 116g 4676 S 0.0 96.8 0:18.20 21g mysqld
9993 root 20 0 147g 116g 4676 S 0.0 96.8 0:03.38 21g mysqld
9994 root 20 0 147g 116g 4676 S 0.0 96.8 0:01.14 21g mysqld
9995 root 20 0 147g 116g 4676 S 0.0 96.8 0:00.00 21g mysqld
9999 root 20 0 147g 116g 4676 S 0.0 96.8 34:12.34 21g mysqld
10058 root 20 0 147g 116g 4676 S 0.0 96.8 8:19.05 21g mysqld
10061 root 20 0 147g 116g 4676 S 0.0 96.8 9:21.93 21g mysqld
10082 root 20 0 147g 116g 4676 S 0.0 96.8 3:46.24 21g mysqld
10086 root 20 0 147g 116g 4676 S 0.0 96.8 17:18.62 21g mysqld
10153 root 20 0 147g 116g 4676 S 0.0 96.8 36:55.88 21g mysqld
10154 root 20 0 147g 116g 4676 S 0.0 96.8 16:27.58 21g mysqld
10156 root 20 0 147g 116g 4676 S 0.0 96.8 12:12.73 21g mysqld
10157 root 20 0 147g 116g 4676 S 0.7 96.8 12:26.13 21g mysqld
10158 root 20 0 147g 116g 4676 S 0.0 96.8 18:10.38 21g mysqld
10163 root 20 0 147g 116g 4676 S 0.0 96.8 2:28.14 21g mysqld
10201 root 20 0 147g 116g 4676 S 0.0 96.8 16:45.92 21g mysqld


Above provided output is what I got on top command where SWAP is displayed in GB I want it to be displayed in KB










share|improve this question























  • possible duplicate of How to force 'top' to show human readable values for %MEM RES and VIRT

    – muru
    Nov 19 '14 at 8:52














0












0








0








I want to find swap used by each interior thread. I used top to view all the running processes and used shift+h(H) to view all threads and I used shift+o(O) with option p to view swap used by each individual thread, and I got the swap used by each individual thread in GB size. But I need to view the swap size used by each individual thread in KB size. Please anyone help on this



Pasting here my top command process



PID  USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  SWAP COMMAND                                                                                                                                                                    
9959 root 20 0 147g 116g 4676 S 0.0 96.8 0:13.28 21g mysqld
9969 root 20 0 147g 116g 4676 S 0.0 96.8 0:10.19 21g mysqld
9970 root 20 0 147g 116g 4676 S 0.0 96.8 0:12.96 21g mysqld
9971 root 20 0 147g 116g 4676 S 0.0 96.8 5:21.34 21g mysqld
9972 root 20 0 147g 116g 4676 S 0.0 96.8 5:27.05 21g mysqld
9973 root 20 0 147g 116g 4676 S 0.0 96.8 5:22.58 21g mysqld
9974 root 20 0 147g 116g 4676 S 0.0 96.8 5:27.03 21g mysqld
9975 root 20 0 147g 116g 4676 S 0.0 96.8 5:49.48 21g mysqld
9976 root 20 0 147g 116g 4676 S 0.0 96.8 5:03.59 21g mysqld
9977 root 20 0 147g 116g 4676 S 0.0 96.8 4:55.42 21g mysqld
9978 root 20 0 147g 116g 4676 S 0.0 96.8 5:03.10 21g mysqld
9986 root 20 0 147g 116g 4676 S 0.0 96.8 0:05.23 21g mysqld
9987 root 20 0 147g 116g 4676 S 0.3 96.8 1:57.07 21g mysqld
9988 root 20 0 147g 116g 4676 S 0.0 96.8 0:01.15 21g mysqld
9989 root 20 0 147g 116g 4676 S 0.0 96.8 5:55.10 21g mysqld
9990 root 20 0 147g 116g 4676 S 1.0 96.8 73:50.11 21g mysqld
9991 root 20 0 147g 116g 4676 S 3.6 96.8 241:03.15 21g mysqld
9992 root 20 0 147g 116g 4676 S 0.0 96.8 0:18.20 21g mysqld
9993 root 20 0 147g 116g 4676 S 0.0 96.8 0:03.38 21g mysqld
9994 root 20 0 147g 116g 4676 S 0.0 96.8 0:01.14 21g mysqld
9995 root 20 0 147g 116g 4676 S 0.0 96.8 0:00.00 21g mysqld
9999 root 20 0 147g 116g 4676 S 0.0 96.8 34:12.34 21g mysqld
10058 root 20 0 147g 116g 4676 S 0.0 96.8 8:19.05 21g mysqld
10061 root 20 0 147g 116g 4676 S 0.0 96.8 9:21.93 21g mysqld
10082 root 20 0 147g 116g 4676 S 0.0 96.8 3:46.24 21g mysqld
10086 root 20 0 147g 116g 4676 S 0.0 96.8 17:18.62 21g mysqld
10153 root 20 0 147g 116g 4676 S 0.0 96.8 36:55.88 21g mysqld
10154 root 20 0 147g 116g 4676 S 0.0 96.8 16:27.58 21g mysqld
10156 root 20 0 147g 116g 4676 S 0.0 96.8 12:12.73 21g mysqld
10157 root 20 0 147g 116g 4676 S 0.7 96.8 12:26.13 21g mysqld
10158 root 20 0 147g 116g 4676 S 0.0 96.8 18:10.38 21g mysqld
10163 root 20 0 147g 116g 4676 S 0.0 96.8 2:28.14 21g mysqld
10201 root 20 0 147g 116g 4676 S 0.0 96.8 16:45.92 21g mysqld


Above provided output is what I got on top command where SWAP is displayed in GB I want it to be displayed in KB










share|improve this question














I want to find swap used by each interior thread. I used top to view all the running processes and used shift+h(H) to view all threads and I used shift+o(O) with option p to view swap used by each individual thread, and I got the swap used by each individual thread in GB size. But I need to view the swap size used by each individual thread in KB size. Please anyone help on this



Pasting here my top command process



PID  USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  SWAP COMMAND                                                                                                                                                                    
9959 root 20 0 147g 116g 4676 S 0.0 96.8 0:13.28 21g mysqld
9969 root 20 0 147g 116g 4676 S 0.0 96.8 0:10.19 21g mysqld
9970 root 20 0 147g 116g 4676 S 0.0 96.8 0:12.96 21g mysqld
9971 root 20 0 147g 116g 4676 S 0.0 96.8 5:21.34 21g mysqld
9972 root 20 0 147g 116g 4676 S 0.0 96.8 5:27.05 21g mysqld
9973 root 20 0 147g 116g 4676 S 0.0 96.8 5:22.58 21g mysqld
9974 root 20 0 147g 116g 4676 S 0.0 96.8 5:27.03 21g mysqld
9975 root 20 0 147g 116g 4676 S 0.0 96.8 5:49.48 21g mysqld
9976 root 20 0 147g 116g 4676 S 0.0 96.8 5:03.59 21g mysqld
9977 root 20 0 147g 116g 4676 S 0.0 96.8 4:55.42 21g mysqld
9978 root 20 0 147g 116g 4676 S 0.0 96.8 5:03.10 21g mysqld
9986 root 20 0 147g 116g 4676 S 0.0 96.8 0:05.23 21g mysqld
9987 root 20 0 147g 116g 4676 S 0.3 96.8 1:57.07 21g mysqld
9988 root 20 0 147g 116g 4676 S 0.0 96.8 0:01.15 21g mysqld
9989 root 20 0 147g 116g 4676 S 0.0 96.8 5:55.10 21g mysqld
9990 root 20 0 147g 116g 4676 S 1.0 96.8 73:50.11 21g mysqld
9991 root 20 0 147g 116g 4676 S 3.6 96.8 241:03.15 21g mysqld
9992 root 20 0 147g 116g 4676 S 0.0 96.8 0:18.20 21g mysqld
9993 root 20 0 147g 116g 4676 S 0.0 96.8 0:03.38 21g mysqld
9994 root 20 0 147g 116g 4676 S 0.0 96.8 0:01.14 21g mysqld
9995 root 20 0 147g 116g 4676 S 0.0 96.8 0:00.00 21g mysqld
9999 root 20 0 147g 116g 4676 S 0.0 96.8 34:12.34 21g mysqld
10058 root 20 0 147g 116g 4676 S 0.0 96.8 8:19.05 21g mysqld
10061 root 20 0 147g 116g 4676 S 0.0 96.8 9:21.93 21g mysqld
10082 root 20 0 147g 116g 4676 S 0.0 96.8 3:46.24 21g mysqld
10086 root 20 0 147g 116g 4676 S 0.0 96.8 17:18.62 21g mysqld
10153 root 20 0 147g 116g 4676 S 0.0 96.8 36:55.88 21g mysqld
10154 root 20 0 147g 116g 4676 S 0.0 96.8 16:27.58 21g mysqld
10156 root 20 0 147g 116g 4676 S 0.0 96.8 12:12.73 21g mysqld
10157 root 20 0 147g 116g 4676 S 0.7 96.8 12:26.13 21g mysqld
10158 root 20 0 147g 116g 4676 S 0.0 96.8 18:10.38 21g mysqld
10163 root 20 0 147g 116g 4676 S 0.0 96.8 2:28.14 21g mysqld
10201 root 20 0 147g 116g 4676 S 0.0 96.8 16:45.92 21g mysqld


Above provided output is what I got on top command where SWAP is displayed in GB I want it to be displayed in KB







swap






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 19 '14 at 7:46









VIJUVIJU

111




111













  • possible duplicate of How to force 'top' to show human readable values for %MEM RES and VIRT

    – muru
    Nov 19 '14 at 8:52



















  • possible duplicate of How to force 'top' to show human readable values for %MEM RES and VIRT

    – muru
    Nov 19 '14 at 8:52

















possible duplicate of How to force 'top' to show human readable values for %MEM RES and VIRT

– muru
Nov 19 '14 at 8:52





possible duplicate of How to force 'top' to show human readable values for %MEM RES and VIRT

– muru
Nov 19 '14 at 8:52










1 Answer
1






active

oldest

votes


















0














A very handy utility I found for determining both the memory and the swap usage of processes is the smem command. It may need to be run as root in order to generate output for all processes. BTW, I found the sort option useful.






share|improve this answer
























  • smem shows swap usage in bytes, not kilobytes. With something like smem -tk you will get unit suffixes, but they will only be shown as kilobytes if the value is between 1 kilobyte and 1 megabyte.

    – Tobias
    Nov 20 '14 at 13:29












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f551307%2fview-swap-usage-in-kb-using-top-command%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














A very handy utility I found for determining both the memory and the swap usage of processes is the smem command. It may need to be run as root in order to generate output for all processes. BTW, I found the sort option useful.






share|improve this answer
























  • smem shows swap usage in bytes, not kilobytes. With something like smem -tk you will get unit suffixes, but they will only be shown as kilobytes if the value is between 1 kilobyte and 1 megabyte.

    – Tobias
    Nov 20 '14 at 13:29
















0














A very handy utility I found for determining both the memory and the swap usage of processes is the smem command. It may need to be run as root in order to generate output for all processes. BTW, I found the sort option useful.






share|improve this answer
























  • smem shows swap usage in bytes, not kilobytes. With something like smem -tk you will get unit suffixes, but they will only be shown as kilobytes if the value is between 1 kilobyte and 1 megabyte.

    – Tobias
    Nov 20 '14 at 13:29














0












0








0







A very handy utility I found for determining both the memory and the swap usage of processes is the smem command. It may need to be run as root in order to generate output for all processes. BTW, I found the sort option useful.






share|improve this answer













A very handy utility I found for determining both the memory and the swap usage of processes is the smem command. It may need to be run as root in order to generate output for all processes. BTW, I found the sort option useful.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 19 '14 at 8:17









mdpcmdpc

8711818




8711818













  • smem shows swap usage in bytes, not kilobytes. With something like smem -tk you will get unit suffixes, but they will only be shown as kilobytes if the value is between 1 kilobyte and 1 megabyte.

    – Tobias
    Nov 20 '14 at 13:29



















  • smem shows swap usage in bytes, not kilobytes. With something like smem -tk you will get unit suffixes, but they will only be shown as kilobytes if the value is between 1 kilobyte and 1 megabyte.

    – Tobias
    Nov 20 '14 at 13:29

















smem shows swap usage in bytes, not kilobytes. With something like smem -tk you will get unit suffixes, but they will only be shown as kilobytes if the value is between 1 kilobyte and 1 megabyte.

– Tobias
Nov 20 '14 at 13:29





smem shows swap usage in bytes, not kilobytes. With something like smem -tk you will get unit suffixes, but they will only be shown as kilobytes if the value is between 1 kilobyte and 1 megabyte.

– Tobias
Nov 20 '14 at 13:29


















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f551307%2fview-swap-usage-in-kb-using-top-command%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Human spaceflight

Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

張江高科駅