Sar-u 1 2Iostat-c 1 2Vmstat 1 2TopUptimeLinux monitors CPU overall performance commonly used tools are:# Mpstat:mpstat not only can view the average information of all CPUs, but also can view the information of the specified CPU.# Vmstat: Can only
CD///Switch directory,To the root directory/: root CD ~Quickly go back to the current user's home directoryCD-//return to the directory you visited last timeCd.. Return to the top level directorypwd//printing the current directory pathLS//Lists the
File Operations in Python (),
You can't remember the API. I used this when I wrote it last night, but I didn't remember it, So I simply sorted it out:
Files and folders in python(File operation functions)The operation involves the OS module and
Python file operation instance Source: EDIT: EXP
Time: 2012-09-14
[Python]#-*-Coding: UTF-8 -*- Import OSImport shutil #1. Path operations: Judgment, acquisition, and deletion #1. Get the current working directory, that is, the directory path for
File Operations
Get directory content
Ls
Getconf ARG_MAX
Determine whether a file exists
Create a file
Create a general file:
Create a file
1 use the redirection output:> text.txt
2. Use the NULL command:> test. xtx to increase script portability.
For more information about common Python file operations, see
[1. OS]1. Rename: OS. Rename (old, new)2. Delete: OS. Remove (file)3. List the files in the directory: OS. listdir (PATH)4. Get the current working directory: OS. getcwd ()5.
File Operations in the OS module:OS module attributesLinesep is a string used to split rows in a file.A string used to separate the file path name.Pathsep is a string used to separate file paths.String name of the current working directory of
Linux Command Line and shell script Programming
This time, I read the Linux Command Line and shell script programming book for 3rd Times. In general, this book is quite good. It is suitable for beginners. I also learned about shell programming from
Linux CPU usage in C # include
# Include
# Include // header file
Struct occupy // declare an Occupy struct
{
Char name [20]; // defines a char-type array name with 20 Elements
Unsigned int user; // defines an unsigned int-type user.
Unsigned int
ArticleDirectory
Iostat
Meminfo and free
Mpstat
Netstat
Nmon
Pmap
PS and pstree
SAR
Strace
Tcpdump
Top
Uptime
Vmstat
Wireshark
Original article link
If you want to know what your server is
CPU performance indicators
1. CPU usage ratio of user processes
2. CPU usage ratio of System Processes
3. WIO, waiting for I/O is the ratio of the CPU in idle state.
4. CPU idle rate
5. Percentage of CPU used for context switching
6. Nice
7.
Http://nluyan.vicp.net/showdetails.aspx? Postid = 190Get started with mono-mono Installation Guide
Currently, you can obtain the mono software package in the following four ways.
•ToMonoDownload the release version of the installation package from
"The proc file system is a pseudo file system, which only exists in the memory and does not occupy the external storage space. It provides interfaces for accessing system kernel data in the form of a file system. Users and applications can obtain
Linux File timeGuideThe file time is the file access time, modification time, and change time. Atime is called the access time in the Linux file system. When the file content is accessed, the time is updated. mtime indicates that when "content data"
CentOS disk management commandsCentOS disk management commands
Df disk free
Display disk Information
Df [-aHhiklmPT] [-- block-sze = ] [-t file system type] [-x file system type]
Parameters:
-A or all contains all file systems
-H: display
Time when the file is read
#! /Bin/bash
For file in 'ls/root'
Do
Stat $ file> 1.txt
Sed-n "7 p" 1.txt> 2.txt
Usetime = awk-F ":" '{print $2}' 2.txt
Echo "time =" $ file $ usetime
Done
The while statement that reads each row of a file.
Cat afile |
PHP: Get file attributes latest modification time:
$file = 'test.txt';
echo date('r', filemtime($file));
?>
The unix timestamp is returned, which is commonly used in cache technology.
Related PHP file properties are also
Centos memory CPU Calculation Method
CPU usageHere, we need to extract four pieces of data from/proc/stat: user mode, nice mode, and system mode) and idle processor time (idle ). They are located in the first line of the/proc/stat file. The CPU
In Shell, trick, who processes file names with spaces, finally downloaded the books in the post of the 16 Python books on the forum, I found that there were several titles in front of which there was a [author #123] author in automatic order ):#!
For python file operations,
You can't remember the API. I used this when I wrote it last night, but I didn't remember it, So I simply sorted it out:
Files and folders in python(File operation functions)The operation involves the OS module and shutil
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.