Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    What is 'dc' and why would it be using 100% CPU

    Scheduled Pinned Locked Moved General pfSense Questions
    5 Posts 4 Posters 514 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      deet
      last edited by

      I saw a process named 'dc' (/usr/bin/dc) on my SG-1000 using excessive CPU. Not knowing why my firewall would be running the FreeBSD calculator, I killed it. Now the firewall has gone offline.

      What process is this, and what purpose does it serve in pfSense?

      1 Reply Last reply Reply Quote 0
      • KOMK
        KOM
        last edited by

        https://www.freebsd.org/cgi/man.cgi?query=dc§ion=1

        Description
        dc is an arbitrary precision arithmetic package.  The overall structure of dc is a stacking (reverse Polish) calculator i.e. numbers are stored on a stack.  Adding a number pushes it onto the stack.  Arithmetic operations pop arguments off the stack and push the results.  See also the bc(1) utility, which is a preprocessor for dc providing infix notation and a C-like syntax which implements functions and reasonable control structures for programs.

        It must be chewing on something.  I don't know what pfSense uses dc for.

        1 Reply Last reply Reply Quote 0
        • D
          doktornotor Banned
          last edited by

          Have you enabled some fancy optimization feature in pfBlockerNG?

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            At a glance and quick grep I don't see anything in the base system that calls dc. What packages do you have installed? What features are enabled in those packages?

            If you look at "ps uxaww" or "top -aSH" do you see the parameters to dc? If so, what are they?

            Also if you check "ps xuawwd" it will output a tree style ps that should show you what called dc

            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            1 Reply Last reply Reply Quote 0
            • D
              deet
              last edited by

              Nothing fancy… it's 2.4.0RC as shipped.

              The firewall has now reset itself and is back online. There's nothing useful in dmesg or system.log.

              Only package installed is AutoConfigBackup.

              I'll try digging more with ps next time it happens. I might try rigging up monit to do it for me.

              I was hoping there would at least be some pfsense-related reason for dc having been called… now I'm somewhat unsettled.

              Thanks, everyone…

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.