Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
Hi there all I am new to Linux and am trying to figure out how to do the following: Using a long listing and no process modifiers, what is the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2011
    Posts
    11

    New to Linux and need help figuring things out


    Hi there all

    I am new to Linux and am trying to figure out how to do the following:
    Using a long listing and no process modifiers, what is the swap space amount for the bash command
    I have read in books and checked various sites, but still haven't figured out what command I need to type to get this output

    I have tried the PS and the top command, but can't figure out how to either read the info or get the correct results

    Thanks in advance.

    IKE
    Last edited by coyboss; 08-14-2011 at 02:14 AM.

  2. #2
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    5,023
    Hello and Welcome!

    Are you talking about finding the amount of memory in use, and the amount of SWAP in use, at any given time?
    If so, then you're looking for free -m.

    If not, maybe you could rephrase?
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

  3. #3
    Just Joined!
    Join Date
    Aug 2011
    Posts
    11
    Ok thanks for the Idea Jayd.

    Now out of the info that the command gives what would be the swap space amount for the bash?

    Here is my output:

    free -m
    total used free shared buffers cached
    Mem: 491 478 13 0 13 286
    -/+ buffers/cache: 178 313
    Swap: 2015 0 2015

    Thanks

    IKE

  4. #4
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    5,023
    Here is mine, in [code] tags for easier viewing:
    Code:
                 total       used       free     shared    buffers     cached
    Mem:          1944       1622        321          0         31       1205
    -/+ buffers/cache:        385       1559
    Swap:            0          0          0
    The second and third lines are the important ones.
    You'll see that I am using 385 MB of RAM, with 1559 free.
    Notice, though, that I am not using a SWAP partition. But it would read the same way.

    What I'm not sure about with your question: What do you mean by "swap space amount for the bash?"

    The command is typed into a terminal window, which generally uses the bash shell.
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

  5. #5
    Just Joined!
    Join Date
    Aug 2011
    Posts
    11
    I am not sure what they want either, I am in an intro to Linux class and trying to figur this out is all. Instructors english is lacking and its an online class

    Yes I am using the terminal window.

    So based on what you are saying then the bash swap amount would be whatever is shown for swap correct??

    Thanks so much

    IKE

  6. #6
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    5,023
    I'm inclined to say yes.
    Provided that you are looking for a command, in a bash terminal, to show you how much SWAP is in use.
    Last edited by jayd512; 08-14-2011 at 03:15 AM. Reason: spelling
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

  7. #7
    Just Joined!
    Join Date
    Aug 2011
    Posts
    11
    Ok we will go with that then.

    Thanks for the help

    I have some other issues if you want to tackle them too??

    IKE

  8. #8
    Linux User sgosnell's Avatar
    Join Date
    Oct 2010
    Location
    Baja Oklahoma
    Posts
    464
    Your question makes no sense. Bash has no swap space, it just uses available memory. Swap is managed by the kernel, and the amount of swap in use depends on the amount of memory in use by the system. Most of the time, with adequate available RAM, the swap in use is zero, but memory is swapped if necessary. I don't know of a way to find out how much of the swapped memory is from bash, if any. I suspect you may be misunderstanding the question.

  9. #9
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    5,023
    Quote Originally Posted by sgosnell View Post
    I suspect you may be misunderstanding the question.
    That's exactly what I was thinking.
    I'm still not sure if that's what he was asking about.
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

  10. #10
    Just Joined!
    Join Date
    Aug 2011
    Posts
    11
    hi Sgo and Jay,
    I am not sure what it was exactly that I was supposed to provide.

    It was the question that was posed to us by the teacher, and I couldn't find anything anywhere on the net to figure out how to find the info.

    So I came to the experts. I undestand it is a confusing question, but like I said the teacher's english is not all that great.

    Thanks again

    IKE

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •