Score:1

Check script running by Apache by PID

bf flag
Tom

Via HTOP I detect some Apache scripts running (www-data /usr/sbin/apache2 -k start) for a long time, or even using a lot of CPU.

In some cases these scripts are the cause of database congestion and/or slow apache server, creating a ripple effect that leaves our systems sluggish or in the worst case, unavailable for use.

I know Apache has mod_status, but the CIS Benchmarks recommendation is to disable this feature for security, in order to prevent intruders from being able to view this information.

Is it possible via PID to find out which script on my site this process is running?

Archemar avatar
mx flag
like `ps --ppid PID` to select all chlid from PID ? (on a side note, nothing show up on apache's log ? I would seek for misspelled/undeclared php variable for instance)
Paul avatar
cn flag
Ubuntu 16.04 is EOL. Server Fault is for questions about managing information technology systems in a business environment.
Tom avatar
bf flag
Tom
@Archemar The number of requests in the log is huge, even per minute, making it impossible to track anything. It also does not record the PID that generated the request.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.