Summary of common instructions for Linux---

Source: Internet
Author: User

To view Linux system load:

http://www.lupaworld.com/ article-217011-1.html
In the Linux system, uptime, top and other commands will have the output of the load average on average.

- It is not waiting for the result of the I/O operation
-it does not actively enter the waiting state (That is, you did not call ' wait ')
-not stopped (ex: Waiting to terminate)

example:

 [[email  protected] init.d]# uptime  7 : 51pm Up 2  days, 5 : 43 , 2  users, load average: 8.13 , 5.90 , 4.94   




generally as long as the current number of active processes per CPU is not greater than 3 then the performance of the system is good, if the number of tasks per CPU is greater than 5, then it indicates that the performance of this machine has serious problems. For the above example, assuming that the system has two CPUs, the current number of tasks per CPU is: 8.13/2=4.065. This indicates that the performance of the system is acceptable.
Now the situation is: after the Flash upload method sends the processing instructions, Flash is to continue to send requests to see if the conversion is complete, it is recommended not more than 50 pictures, or the conversion time is too long, Flash will send a lot of requests come over, if you control the interval of viewing, the interval is raised a bit, the user waiting time also multiplied by the

(1) View all users cat/etc/passwd
(3) View system cores Cat/proc/cpuinfo |grep ' processor ' |wc-l
grep ' physical id '/proc/cpuinfo | Sort | Uniq | Wc-l

Copy Entire Directory
Cp-ri a/b/* a1/b1/
If the copy process asks whether to overwrite, enter Y press ENTER also if A A1 not in the same directory, it is best to fill the absolute path, is/xxx/xxx/a/b/*/xxx/...

(6) Linux timed Tasks
crontab command options basic only for user action options:
u Specify user
-l List A user task schedule
-R delete a user task
-e edit a user task

View a user's scheduled tasks crontab-u root-l
To view all users can only enumerate the script based on the/etc/passwd file user name
User Scheduled task/var/spool/cron/, as root to see:
Cd/var/spool/cron
Cat *

Eg: as follows

make two parts of the. Xml interface, an information class, a picture class, the column of the new push in the search column, edit daily manually add to push the photos to the column of the five major categories of focus (goddess, star, pet, Travel, collocation), and then regularly generate the corresponding push files, let the search to crawl data, Pclady edit each column updated 5 images each day, the search free crawl238.213: the 0* * * */usr/bin/wget-o/dev/NULL--spider-t1-T - 'http://192.168.238.213:8080/template/ladyproduct/intf/intf4ZhongSou.jsp?status=1&cId=1393'>/dev/NULL 2>&1 - 0* * * */usr/bin/wget-o/dev/NULL--spider-t1-T - 'http://192.168.238.213:8080/template/ladyproduct/intf/intf4ZhongSou.jsp?status=-1&cId=1393'>/dev/NULL 2>&1 $ 0* * *rsync238.213:/data/web/pclady-photo/dataxml/data_normal_*.xml--239.57238.213:/data/web/pclady-photo/dataxml/data_forbidden_*.xml--239.57

Second, Linux find files with "XXX" specific information
In the application root directory execution
Find. -type f-name "*.jsp" | Xargs grep "window.open"

Three, from the online packaging directory
Cp-r/data/uploadcenter ~ to own directory
Zip-r Web.zip uploadcenter/

(4) The Linux server "has no space" "
Development machine Dev2 on the UPA/UPC upload files, will be mounted in the/directory, and here only 3G space, through the Df-h show the use of the major mount points;
Java upload by default will first upload to the TMP temp directory, if/directory space is not enough, you can consider uploading to use another directory, eg:tmp

Command Top (view threads) | | Free m (show memory in M) | | Df-h/m (displays each big mount point file system) | | /proc/sys/vm/overcommit_memory

 "Java.io.IOException:Cannot Run program "   : Java.io.ioexception:error=12  - Span style= "color: #000000;" >mtotal used free shared buffers Cachedmem:  3018  2901  0  92  91 -/+ buffers/cache: 2717  Span style= "color: #800080;" >300  swap:  2047  2042  4  


As long as you do not swap space swap, you do not have to worry about your memory too little. If you use a lot of swap, you might want to consider adding physical memory.

Summary of common instructions for Linux---

Related Article

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.