5.7 of Performance_schema already have the ability to monitor the memory usage of MySQL, for this is to be achieved through the instrument, because the memory this piece does not have a corresponding consumer so long asWell, it's okay to configure instrument.1. Example:/etc/my.cnf[Mysqld]datadir =/usr/local/mysql/databasedir =/usr/local/mysqlperformance_schema_instrument = ' Memory%=counted 'Select Event_name,curr
I. pg_class:
The system table records metadata of data tables, indexes (still need to see pg_index), sequences, views, composite types, and some special link types. Note: not all fields make sense for all object types.
Name
Type
Reference
Description
Relname
Name
Data Type name.
Relnamespace
Oid
Pg_namespace.oid
OI that contains the namespace (mode) of this object.
Reltype
and replace the redundant output: [PGSCRIPT], delete the [QUERY] in the header and the printed QUERY statement,--The final file is a. html file.-- Open the saved webpage in a browser and copy the content of the webpage to the Word document. You can organize the content in the following format.-- Note:-- The script contains the data dictionary of the verbose and lite versions. When using the data dictionary, switch to the corresponding title.-- '-- 'Begin-- Query table nameSet @ table = select d
rate, error, or other parameters exceed the threshold. Then, we use network management or monitoring tools to find out why the threshold has exceeded.
In fact, almost all switches provide the SNMP monitoring switch function, even the cheapest switch. The main difference between them is the information provided. Some low-priced vswitches only provide simple SNMP monitoring switch information, which is for the entire vswitch. Those expensive vswitches can also provide detailed information about e
Open LV 0
Max PV 0
Cur PV 3
Act PV 3
VG Size 3.02 GiB
PE Size 4.00 MiB
Total PE 774
Alloc PE / Size 0 / 0
Free PE / Size 774 / 3.02 GiB
VG UUID bwd2pS-fkAz-lGVZ-qc7C-TaKv-fFUC-IzGNBK
From the output, we can see the volume group usage/total. The physical volume provides space for the volume group. As long
fails, it is transferred to another line.
Mode = 0 indicates the server load balancer mode. both NICs work and must be supported by the switch.
Mode = 1 indicates the redundancy mode. only one network adapter works. if one problem occurs, another one is enabled.
Mode = 6 indicates the server load balancer mode. both NICs work and do not require support from vswitches.
Here I am binding four NICs, and the server is dell R720. the default Nic name is em1 -- em4. when the NIC is bound, the config
The suspicious snmp service is reflected in many software. So we will introduce the Cacti software today. Now I will give a brief introduction to some functions and operations of this software. The Cacti Chinese version is a software implemented in php. Its main function is to use the snmp service to obtain data and then use rrdtool to store and update data, when you need to view data, use rrdtool to generate charts and present them to users.
1. test whether the snmp service is normal
#snmp
support for SNMP monitoring switch has different MIB libraries (Management Information Library ). Each type of MIB is different. In addition to some private MIB that support your vswitch, the standard MIB library is also very useful for monitoring the switching network. The following are some
://pypi.python.org/pypi/memory_profiler
Install memory_profiler:
pip install psutilpip install memory_profiler
Assume that the following code needs to be analyzed:
def my_func(): a = [1] * (10*6) b = [2] * (10*7) del b return a
To use memory_profiler, You need to modify the code. Here we record the following two usage methods:
1. Do not import modules
@profiledef my_func(): a = [1] * (10*6) b = [2] * (10*7) del b return a
Complete code: https://github.com/mike-zhang/pyExa
information-S Display summary information (similar to netstat-i)Add to configure the IPV6 address for the specified NICdel Deletes the IPV6 address of the specified network cardmtunetmaskTunel establishing a tunneldstaddr set a remote address to establish point-to-point communication-broadcast-pointtopointMulticast Setting the multicast flag for the network cardaddress sets IPV4 addresses for network cardstxqueuelen4. Usage Examples:Example 1: Displaying network device information (active state
From the perspective of persistence, Hibernate divides objects into four states: Persistence State, temporary state, free state, and delete state. The Session method can convert objects from one state to another.Temporary object in the Persistent Object state (Transient ):
-When the proxy primary key is used, the OID is usually null-not in the Session cache-no corresponding records in the database
Persist ):
-
to persist:
If the save method is used, it can be saved successfully, and the assigned oid value does not work.
If the value to be assigned takes effect, use the save (Object, ID) method. You can use the replicate method to perform similar operations.
2. saveOrupdate does not save or update the database based on the record or not, but on the object state. If it is a transient object, it is saved. If it is in the detached state, it is updated. it wil
(A, n=100):
Time.sleep (1)
b = [a] * n
Time.sleep (1)
Return b
if __name__ = = ' __main__ ':
A = My_func ()
Print Cur_python_mem ()
Print ""
Print Memory_usage ((f, (1,), {' n ': Int (1e6)}), interval=0.5)
Run the above code and the output is:
Copy Code code as follows:
jay@jay-air:~/workspace/python.git/py2014 $python mem_profile.py
Filename:mem_profile.py
Line # Mem usage Increment line Contents
================================================
8.0
can be reset by sysctl the command line excuse.
The SYSCTL function returns a consistent snapshot based on the needs of the data. Consistency includes being locked into the destination buffer memory so that the data is copied out without the need for a lock, and the call function Sysctl to avoid deadlock.
This rule is described in the form of a MIB name, listing name, and the length of this name is the parameter Namelen.
The Sysctlbyname function acc
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.