Results 1 to 3 of 3

Thread: Power saving Home Ubuntu Server

  1. #1
    Join Date
    Aug 2007
    Beans
    4
    Distro
    Ubuntu 9.10 Karmic Koala

    Power saving Home Ubuntu Server

    I've been tinkering with creating a home file server more for fun than anything else. However I'd rather that it wasn't running 24/7 as this is unnecessary. Is there anyway to determine whether the server is being used or accessed? Specifically can I test if samba is being used.
    Waking the machine will be done using wake on lan.
    Thanks in advance

  2. #2
    Join Date
    Nov 2004
    Location
    Canuck Land
    Beans
    214
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Power saving Home Ubuntu Server

    Log files will tell you.

  3. #3
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    7,822
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Power saving Home Ubuntu Server

    It's tough to use smbd usage as a shutdown criteria. Perhaps just shut it down at a certain time each night.

    There are some tools that you can use:

    man smbcontrol

    tgalati4@tpad-Gloria7 ~ $ sudo smbcontrol smbd ping
    PONG from pid 2467

    Take the Process ID (pid) from above and feed it to:

    tgalati4@tpad-Gloria7 ~ $ ps u -p 2467
    USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
    root 2467 0.0 0.0 13064 1528 ? Ss Feb24 0:00 /usr/sbin/smbd -D

    Since I don't have any Windows machines, my smbd is pretty quiet.

    You could use gawk (man gawk) to grab the CPU% (in the third field above) and do a test. If greater than 0.0% than smbd is doing something, put off sleep for 10 minutes, etc.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

Bookmarks

Posting Permissions

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