For creating or editing programs that perform system administration tasks. Non-programming questions (including those about system administration operations or sysadmin tools) generally belong on Super User or Server Fault.
Questions tagged [sysadmin]
571 questions
1287
votes
20 answers
How to use SSH to run a local shell script on a remote machine?
I have to run a local shell script (windows/Linux) on a remote machine.
I have SSH configured on both machine A and B. My script is on machine A which will run some of my code on a remote machine, machine B.
The local and remote computers can be…
Arun
449
votes
13 answers
How can I delete a service in Windows?
I have a couple old services that I want to completely uninstall. How can I do this?
sgwill
- 8,694
- 7
- 31
- 40
263
votes
5 answers
How to find out what group a given user has?
In Unix/Linux, how do you find out what group a given user is in via command line?
Alex Argo
- 8,620
- 12
- 40
- 45
226
votes
3 answers
Crontab Day of the Week syntax
In crontab does the Day of the Week field run from 0 - 6 or 1 -7?
I am seeing conflicting information on this. wikipedia states 0-6 and other sites I have seen are 1-7.
Also what would be the implication or either using 0 or 7 incorrectly? i.e.…
Marty Wallace
- 28,588
- 50
- 124
- 189
172
votes
16 answers
Tracking CPU and Memory usage per process
I suspect that one of my applications eats more CPU cycles than I want it to. The problem is - it happens in bursts, and just looking at the task manager doesn't help me as it shows immediate usage only.
Is there a way (on Windows) to track the…
Eli Bendersky
- 231,995
- 78
- 333
- 394
147
votes
6 answers
Locate the nginx.conf file my nginx is actually using
Working on a client's server where there are two different versions of nginx installed. I think one of them was installed with the brew package manager (its an osx box) and the other seems to have been compiled and installed with the nginx packaged…
rgb
- 2,574
- 3
- 15
- 26
142
votes
8 answers
Best practice to run Linux service as a different user
Services default to starting as root at boot time on my RHEL box. If I recall correctly, the same is true for other Linux distros which use the init scripts in /etc/init.d.
What do you think is the best way to instead have the processes run as a…
James Brady
- 21,724
- 7
- 48
- 56
107
votes
6 answers
lsof survival guide
lsof is an increadibly powerful command-line utility for unix systems. It lists open files, displaying information about them. And since most everything is a file on unix systems, lsof can give sysadmins a ton of useful diagnostic data.
What are…
Hans Sjunnesson
- 20,322
- 17
- 51
- 63
104
votes
9 answers
Calling JMX MBean method from a shell script
Are there any libraries that would allow me to call a JMX MBean method from a shell script. We expose some operations/admin commands through JMX, and we could have our admins use JConsole, or VisualVM, but some tasks are better left to automation.…
Dougnukem
- 14,091
- 23
- 86
- 129
94
votes
13 answers
How do I daemonize an arbitrary script in unix?
I'd like a daemonizer that can turn an arbitrary, generic script or command into a daemon.
There are two common cases I'd like to deal with:
I have a script that should run forever. If it ever dies (or on reboot), restart it. Don't let there ever…
dreeves
- 25,132
- 42
- 147
- 226
65
votes
7 answers
How is it possible that kill -9 for a process on Linux has no effect?
I'm writing a plugin to highlight text strings automatically as you visit a web site. It's like the highlight search results but automatic and for many words; it could be used for people with allergies to make words really stand out, for example,…
Aaron Digulla
- 297,790
- 101
- 558
- 777
60
votes
3 answers
How do I add a user in Ubuntu?
Specifically, what commands do I run from the terminal?
quackingduck
- 5,457
- 5
- 26
- 22
47
votes
5 answers
How do I make cron run something every "N"th minute, where n % 5 == 1?
I know that I can have something run every five minutes in cron with a line like:
*/5 * * * * /my/script
What if I don't want it running at 12:00, 12:05, 12:10, but rather at 12:01, 12:06, 12:11, etc? I guess I can do this:
…
mike
- 40,704
- 43
- 97
- 111
46
votes
2 answers
What are the limitations of the flask built-in web server
I'm a newbie in web server administration. I've read multiple times that flask built-in web server is not designed for "production", and must be used only for tests and debug...
But what if my app touchs only a thousand users who occasionnaly send…
edelans
- 6,529
- 4
- 31
- 45
35
votes
4 answers
Free DNS server for Windows XP/Vista/Win7?
I'm currently developing a security solution that should work across domains and as such I need a small private dns server to add various entries to. I could alter the hosts file to achieve the same result but since the hosts file doesn't support…
JohannesH
- 6,260
- 5
- 34
- 67