How do I make cron run something every “N”th minute, where n % 5 == 1?
1-56/5 * * * * /my/script This should work on vixiecron, I’m not sure about other implementations.
1-56/5 * * * * /my/script This should work on vixiecron, I’m not sure about other implementations.
There isn’t one right answer to this question, but here are some things to keep in mind: With the right amount of horizontal scaling, it is quite possible you could keep scaling out use of the debug server forever. When exactly you would need to start scaling (or switch to using a “real” web server) … Read more
As noted in comments to the OP, a process status (STAT) of D indicates that the process is in an “uninterruptible sleep” state. In real-world terms, this generally means that it’s waiting on I/O and can’t/won’t do anything – including dying – until that I/O operation completes. Processes in a D state will normally only … Read more
Without a home directory sudo useradd myuser With home directory sudo useradd -m myuser Then set the password sudo passwd myuser Then set the shell sudo usermod -s /bin/bash myuser
You can daemonize any executable in Unix by using nohup and the & operator: nohup yourScript.sh script args& The nohup command allows you to shut down your shell session without it killing your script, while the & places your script in the background so you get a shell prompt to continue your session. The only … Read more
To show all networking related to a given port: lsof -iTCP -i :port lsof -i :22 To show connections to a specific host, use @host lsof -i@192.168.1.5 Show connections based on the host and the port using @host:port lsof -i@192.168.1.5:22 grepping for LISTEN shows what ports your system is waiting for connections on: lsof -i| … Read more
The following command line JMX utilities are available: jmxterm – seems to be the most fully featured utility. cmdline-jmxclient – used in the WebArchive project seems very bare bones (and no development since 2006 it looks like) Groovy script and JMX – provides some really powerful JMX functionality but requires groovy and other library setup. … Read more
On Debian we use the start-stop-daemon utility, which handles pid-files, changing the user, putting the daemon into background and much more. I’m not familiar with RedHat, but the daemon utility that you are already using (which is defined in /etc/init.d/functions, btw.) is mentioned everywhere as the equivalent to start-stop-daemon, so either it can also change … Read more
Press Win+R, type perfmon and press Enter. When the Performance window is open, click on the + sign to add new counters to the graph. The counters are different aspects of how your PC works and are grouped by similarity into groups called “Performance Object”. For your questions, you can choose the “Process”, “Memory” and … Read more
Running nginx -t through your commandline will issue out a test and append the output with the filepath to the configuration file (with either an error or success message).