1. Connect to the FTP serverFormat: FTP [hostname| ip-address]A) under the Linux command line, enter:FTP 192.168.1.1b) The server asks for your user name and password, enter the user name and the corresponding password, respectively, to be certified.2. Download the fileThe download file usually uses the get and mget two commands.a) GetFormat: Get [Remote-file] [L
1. Connect to the FTP serverFormat: FTP [hostname| ip-address]A) under the Linux command line, enter:FTP 192.168.1.1b) The server asks for your user name and password, enter the user name and the corresponding password, respectively, to be certified.2. Download the fileThe download file usually uses the get and mget two commands.a) GetFormat: Get [Remote-file] [L
Linux daemon can be divided into two categories: Independent startup daemon and super daemon Based on the startup and management methods of daemon: stand_alone ): this type of process is resident in memory after it is started, so it will continue to occupy system resources.
This article introduces the default installation of rhel5.1 after/etc/rc. d/init. the startup scripts of various services in the d directory are arranged in the alphabetical order of acpid: ACPI advanced configuration and power management interface anacron: a scheduling tool in Linux, similar to cron, if you do not need to turn off apmd: apm advanced power...
This article describes the startup scripts of various services in the/etc/rc. d/init. d direc
In the recent days of writing Linux C service programs, daemon and thread creation have failed.After the discovery program is daemon, the thread is all hung up.After checking some documents, I finally got to know why.The operation of the daemon function is actually very easy,1.fork a process, 2. Processing 3 standard i
These tasks that accept user input/COMPUTE/storage/output in Linux systems are provided by Linux system services to help us, and some of these system services need to beWaiting for the user's input or at any time to respond to user requests and so on.The daemon thread (Deamon) usually serves the user in the background of the system as it is activated when the sys
Follow these steps to Configure ftp for logging:
1. # cp/etc/inetd. conf/etc/inetd. conf. bak
2. # vi/etc/inetd. conf
Edit the following ftp lines and add the-l flag at the end:
Ftp stream tcp6 nowait root/usr/sbin/ftpd-l
3. # vi/etc/syslog. conf
Add the following line at the end of the syslog. conf file:
Daemon.info/tmp/
leader process.C, call Setsid to create a new session. Setsid can cause:1) The calling process becomes the first process of a new session.2) The calling process becomes the leader process of a process group.3) The calling process does not control the terminal. (Fork once again to ensure that the daemon process does not open the TTY device afterwards)D. Change the current working directory to the root directory.E, close the file descriptor that is not
the process will not be interrupted by terminal information generated by any terminal2. Why to introduce daemons:Because in Linux, each system communicates with the user interface called the terminal, every process that starts from this terminal will be attached to this terminal, this terminal is called the control terminal of these processes, when the control terminal is closed, the corresponding process will automatically shut down. But the
Tags: release end prctl GPO Roc Cal disappears Linux ForkKill a child processAfter killing the daemon's subprocess, the process changes to a zombie process 14087 ? Ss 0:00 ./test4-1 14088 ? S 0:00 \_ ./test4-1 14089 ? S 0:00 \_ ./test4-1 14090 ? S 0:00 \_ ./test4-1 14091 ? S 0:00 \_ ./test4-1 14092 ? S 0:00 \_ ./test4-1 14093 ? S 0:00 \_ ./test4-1 14094 ? S
FTP implementation of dual-machine hot standby in Linux environmentIn order to realize data storage in production environment, Ftp+mfs realizes data storage usingTo prevent the single point of FTP failure in chickens, the use of ftp+keepalived to achieve high availabilityTwo
working directory to/ theChDir"/"); + - //umask () set to 0 to cancel any file permission masking theUmask0);Bayi the //Close all file descriptors the //sysconf () Gets the maximum number of file descriptors in the current system -CNT =sysconf (_sc_open_max); - for(i =0; I ) the { the Close (i); the } the - //position 0, 1, 2 to/dev/null theOpen"/dev/null", O_RDWR); theOpen"/dev/null", O_RDWR); theOpen"/dev/null", O_RDWR);94 } the the //Deleting Fil
Recently discovered that there was a problem between daemon and thread creation when writing a Linux C service program. After the discovery program is daemon, the thread is all hung up.After checking some documents, I finally got to know why.The operation of the daemon function is actually very simple,1.fork a process,
#!/bin/sh #本脚本为守护进程,, automatic restart process Functioncheck_and_kill_and_start () {log_file=$1 If a process zombie is found
Name=$2 dead_duration=$3 #echo "checktheprogress" $ps _name ymd=$ (date+%Y-%m-%d) Log_file=${log_file}${ymd}.log #echo $log _file to determine whether there is log_file if[!-e${ Log_file}];then exit0 fi #%y Last Modified time last_modify=$ (Stat-c%y${log_file}) now =$ (date+%s) #如果上次写入日志的时间和现在的时间差大于 dead_duration sec, Restart process if[$[ $now -
$last _modify]-gt $dead
Recently VPS Nginx don't know why, will turn off for no reason. It may be that the hen was killed by the high load. But to keep the site online, you've written a daemon:
The code is as follows
Copy Code
Aa= ' Pgrep-f Nginx | Wc-l 'If ["$aa" = 0]Then/usr/local/nginx/sbin/nginx/USR/LOCAL/PHP/SBIN/PHP-FPM startElseecho "The program is running"Fi
Write the above script as an. sh file. Then use the Crontab setting to
Daemon for Linux QT applications
Requirement: when we want to restart the application immediately after it is accidentally closed or aborted, we need the daemon to help.
P.s.: no virus, no virus ......
Implementation Scheme
1. Start the daemon first2. Load and start the QT application in the
Anything-sync-daemon (ASD) is a was a diminutive pseudo-daemon designed to manage target directories in TMPFS and to period ically sync them back to your physical disc (HDD/SSD). This was accomplished via a symlinking step and an innovative use of rsync to maintain back-up and synchronization between The other. One of the major design goals of ASD is a completely transparent user experience.Https://wiki.arc
Rsyslog ProcessSyslog is a tool that records logging in the system and can support local or remote log writes.In the LinuxMint environment, the upstart-based daemon is placed in the/etc/init/directory, and the following command can be used to view the specific startup script:[Email protected]:/var/log$ less/etc/init/rsyslog.confTo see if the current RSYSLOGD has been started:[Email protected]:/var/log$ initctl List | grep rsyslogRsyslog start/running,
execute the back
One more thing to watch out for is the automatic restart.
Automatic restart can be placed in the crontab, once every time, the specific situation of concrete treatment.Crontab-e# Open the current user schedule, add mode # There are 5 asterisks in the timeline, F1,f2,f3,f4,f5,#其中f1表示分, F2, F3 represents the day, F4 represents the month, F5 represents one weeks the first day #* indicates every minute/hour/day/month/Sunday, */n means every n/hour/... Execute once */2 *
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.