Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8758331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:31:14+00:00 2026-06-13T14:31:14+00:00

I need daemon script which every 3 seconds call command: cat /proc/stat > /some/file

  • 0

I need daemon script which every 3 seconds call command: cat /proc/stat > /some/file

can anybody help me how make and setup this? (system is debian squeeze)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T14:31:15+00:00Added an answer on June 13, 2026 at 2:31 pm

    like this?

    #!/bin/sh
    while true
    do
       cat /proc/stat > /some/file
       sleep 3
    done
    

    and run it with /path/to/scrip.sh &

    (use the trailing & to run it in the background, that is: “daemon” mode)

    it’s not very sophisticated (e.g. the only awy to stop it once it’s started is by killing it), but does what you asked for.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to run a standalone ruby script as Unix (linux) daemon. After running
I need to create daemon that will monitor certain directory and will process every
I have some scripts which need to be run only through the CLI interface.
ux and i need delete a specific file every day. then I need to
I need to run some code on storage device mounting and unmounting. How can
I have a PHP script that I need to run every minute. I have
I've got some slim terminals with Linux where a little script it's launched every
I have a node.js script which need to start at boot and run under
I need to run a php script as daemon process (wait for instructions and
I have a daemon script written in ruby which responds to commands like daemon

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.