Linux is used for background monitoring of the specified program health script (restart the program if the program is dead)

#!/bin/shWhile TrueDoPS | grep "MAIN_3G" | Grep-v "grep" >/dev/nullIf ["$?"-ne 0]Thenls/root/main_3g >/dev/nullIf ["$?"-eq 0]Thenchmod 777/root/main_3g/ROOT/MAIN_3G &echo "main_3g Restart"Elseecho "main_3g is not exist."FiFiPS | grep "MAIN_4G" |

Synchronization of Linux environment Programming (i): Mutual exclusion lock

Synchronized content in the "UNP2" as the inter-process communication, I think that in fact, synchronization is only a collaborative way of communication between processes a means of collaboration, not known as a form of interprocess communication,

Linux system programming

Wait () and Waitpid ()Function descriptionThe wait () function is used to block the parent process (that is, the process that calls wait () until a child process finishes or the process receives a specified signal. If the parent process has no child

LED driver for embedded Linux learning notes

Recently in the study of embedded Linux driver development, a general understanding of the basic driver development process, this article is mainly for the character device driver development to do a brief introduction, but also as a small summary

Memory management of the Linux kernel (4)--Missing pages handler

This article mainly explains the missing pages processing program, the gaze is specific enough, no longer explained.The following function maps a page memory page to a specified linear address, which returns the physical address of the page//Maps a

Linux Statistics program run time

Test code run time in Linux has a function to get the current time, accurate to microseconds----> gettimeofday ()1#include       // int gettimeofday (struct timeval *tv, struct timezone *tz);2 /*********************************************3 *

How to view Linux versions

The most useful piece of code to play the video is:Program codeOther look at the parameters to modify it yourself1.avi formatThe code snippet is as follows:Program code""2.mpg formatThe code snippet is as follows:Program code"4.RM formatThe code

How to modify the user default directory under Linux

Linux under the default User directory is generally/home/xxx (except the root user), sometimes we may need to modify this directory, below I would like to share with you 2 Modified method Tools/Ingredients Linux operating system Method/Step

Linux Debug (Dos Simulator, analog Debug)

Recently studied Wang Shuang that this "assembly language", but its experiments are Windows environment, need to use DOS.But the most unixer, how to develop under Windows? So, use the tools under Linux.Assembler MASM can be replaced with GCC or as

Linux Statistics program run time

Test code run time in Linux has a function to get the current time, accurate to microseconds----> gettimeofday ()1#include       // int gettimeofday (struct timeval *tv, struct timezone *tz);2 /*********************************************3 *

Linux character device driver

First, the full source of the program is listed/root/drivers/freg----FREG.C----Freg.h----MakefileFreg.h#ifndef _fake_reg_h_#define _fake_reg_h_#include #include #define Freg _device_node_name " freg" #define Freg_device_file_name "Freg" #define

Analysis of Linux virtual file system

Analysis of Linux virtual file systemvirtual file System (VFS)In my opinion, the word "virtual" has two meanings:1, in the same directory structure, a number of different file systems can be mounted. VFS hides their implementation details, providing

Linux File and folder permissions

Universal Linux basic knowledge, Linux files and folder permissions, do not move on 777 permissions. The online tutorial is too complex to be wordy, briefly summarized as follows ...One, view Linux file permissionsLs-l (General)LL (Ubuntu applies,

LINUX filesystem structures.

1./–root Every single file and directory starts from the root directory. Only the root user has the write privilege under this directory. Please note that That/root is root user's home directory, which is not same as/.

Install Memcache under Linux

1, Memcache used to libevent (this library for socket processing), need to install Libevent:(1)tar zxvf libevent.tar.gz after entering the extracted folder(2)./configure--prefix=/usr/lib(3) Make&& make install (4) test whether the Libevent is

Memory management of the Linux kernel (4)--Missing pages handler

This article mainly explains the missing pages processing program, the comment is enough detailed, no longer explain.The following function maps a page memory page to a specified linear address, which returns the physical address of the page//Maps a

Windows and Linux sockets communication

? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 windows client 端口//

[Linux] Ubuntu13.04-windows8hyperv Pre-Virtual installation instructions

1. How to partition Ubuntu1./swap swap partition, generally twice times the memory of your machine, less than this capacity, the system can not enter hibernation.The essence is the swap space on the hard disk, not the partition, so there is no

Windows Migration Linux Issue highlights

http://blog.csdn.net/m_star_jy_sy/article/details/84822021) ' _wcsicmp ' has not been declared in this scope#ifdef WIN32#define _TCSICMP _wcsicmp#else#define _TCSICMP wcscasecmp#endif2) _stricmp not declared in this scope#include change _stricmp to

Example of whitelist of apache rewrite Rules

Here is a method for configuring the whitelist using rewrite Rules in apache. Today, I got apache rewrite Rules for half a day, but I still haven't configured any matching rules. My colleague gave me some advice and succeeded. Requirements:Six

Total Pages: 5467 1 .... 2345 2346 2347 2348 2349 .... 5467 Go to: GO

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.