Recently developed ios project, the number of active mobile phones of the app to be sent to the server. Obtain the unique identifier UUID or MAC address of the mobile phone. The MAC address is obtained because uuid cannot be obtained after IOS5. The code below is highly reusable and can be used as an important reference.
# Pragma mark MAC
// Return the local MAC addy
// Courtesy of FreeBSD hackers email list
// Accidentally munged during previous update. Fixed thanks to mlamb.
-(NSString *) mac
First of all, the following two methods can get the phone's MAC address, but there is a limit, in the iOS7 below can be obtained. IOS7 after the Apple for SYSCTL and IOCTL technical processing, MAC address returned are 02:00:00:00:00:00.
It is written in the official document:
"Twolow-level networking APIs that used to return a MAC address now return thefixed value 02:00:00:00:00:00." The APIs in question are Sysctl (net_rt_iflist) and IOCTL (siocgifconf). Developers using the value of the MAC
(Inet_ntop (Af_inet6, addr6->sin6_addr, Addrbuf, Inet6_addrstrlen)) {
Type = Ip_addr_ipv6;
}
}
if (type) {
NSString *key = [nsstringstringwithformat:@ "%@/%@", name, type];
Addresses[key] = [NSSTRINGSTRINGWITHUTF8STRING:ADDRBUF];
}
}
}
Free memory
Freeifaddrs (interfaces);
}
return [Addressescount]? Addresses:nil;
}
This is to obtain the hardware address of the network card code, if you can not compile the pass, remember to put the following these header files Add.
#include #include #includ
Daemon is running
Running Vnstat with no options will only show the total amount of data transferred since the daemon was run.
$ vnstat
Database Updated:mon Mar 17 15:26:59 2014
Eth0 since 06/12/13
rx:135.14 Gib tx:35.76 Gib total:170.90 GIB
Monthly
Rx |TX |Total | Avg. rate
------------------------+-------------+-------------+-------------
Feb ' 8.19 GiB |2.08 GiB |10.27 GiB | 35.60 kbit/s
Mar ' 4.98 GiB |1.52 GiB |6.50 GiB | 37.93 kbit/s
------------
for the management information query request message sent by the Administrator process. port 162 is listened by the Administrator process to report the Trap Message for the exception event sent by the device agent process, such as trap.
All information of a device that needs to be managed is considered as a collection of various managed objects. These managed objects are defined by OSI in a Management Information Base (MIB).Manage Object Library
From osdev wikijump:
Navigation, search
This article describes the contents of the computer's physicalMemory AtThe moment that the BIOS jumps to your bootloader code.
Contents
1 "low"Memory(MiB)
1.1 Overview
1.2 BIOS data area (bytes)
1.3 extended BIOS data area (EBDA)
1.4rom Area
2 "upper"Memory(>1 MIB)
3 comments
4see also
every 24 mounts or 180 days, whichever comes first. use tune2fs-c or-I to override. step 8 Mount [plain] # Mount web [root @ serv01 ~] # Mount/dev/myvg/mylv01/web # mount data [root @ serv01 ~] # Mount/dev/myvg/mylv02/data # View disk information [root @ serv01 ~] # Df-h Filesystem Size Used Avail Use % Mounted on/dev/sda2 9.7G 1.1G 8.1G 12%/tmpfs 188 M 0 188 M 0%/dev/shm/dev/sda1 194 M 25 M 160 M 14%/boot/dev/sda5 4.0G 137 M 3.7G 4%/opt/dev/sr0 3.4G 3.4G 0 100%/iso/dev/mapper/myvg-mylv01 985 M
information about the mib node "". This cocould be causedBecause you supplied an incorrectly node, or by the MIB that you'reTrying to generate code from isn' t loaded. To make sure your mib isLoaded, run mib2c using this as an example:Env MIBS = "+ MY-PERSONAL-MIB" mib2cYou might wish to start by reading the
1. Download Net-snmpHttp://net-snmp.sourceforge.net/download.htmlFor example, download version 5.52. Go to the download directory, unzip the NET-SNMP compression pack#tar ZXF net-snmp-5.5.tar.gz3.configure#cd net-snmp-5.5#./configure--with-default-snmp-version= "2"--with-sys-contact= "[email protected]"--with-sys-location= "Location" --with-logfile= "/var/log/snmpd.log"--with-persistent-directory= "/var/net-snmp"4.make# make# make Install5. Configuring the Conf file# vi/etc/snmpd.confEnter a lin
Use of Xen virtual machines
(i) using virtual machine profiles and disk files to manually start the virtual machine system
After the virtual machine system is created, the virtual system will start up and use the XM List command to see all the virtual machines that are started , but the next time we restart the system, we will not see the virtual machines created with the XM list . the network device for the virtual machine is not visible in the network device . At this point we need to manua
Network Browser is a tool in the SolarWinds Network management software set. It can be used to scan Network devices in an IP segment.
So I run IP Network Browser and enter 210. 224. *. 1 ~~~ 210. 224. *. 254 network segment scan, the scan results are not as expected, the IP address is 210. 224. *. the device of 1 is a vro and cisco. It is found that the permission of Community String is private, that is, full permission.
Here, we have to talk about a
Tool Name:Solarwinds engineer Edition
Www.solarwinds.net
Recommendation reason: Some readers said: "in less than an hour, I downloaded and installed the Authorized Version of solarwinds from the website. Soon, I will be able to prepare a line usage report, and the line usage and basic response time functions are very good. In addition, the data will be saved, this allows me to view data for one week, one month, or one year."
Tool Name:NetwatchKit
Comp
1. MIB LibraryView NetThe installation directory for the-SNMP. /usr/share/snmp/MIBs directory: NET-snmp-examples-Mib.mib The contents of this part are as follows: Netsnmpexampleheartbeatrate OBJECT-TYPE SYNTAX Integer32 MAX-access accessible- for-Notify STATUS current DESCRIPTION"a simple integer object, to act as A payload for thenetsnmpexampleheartbeatnotification. The value has no real meaning, but isNominally the interval (inchseconds) between suc
Agentx Roles1. MasterAn entity acting in a Master agent role performs the following functions:-Accepts AGENTX session establishment requests from subagents.Accept A session request from subagents-Accepts registration of MIB regions by Subagents.Accept A session request from subagents-Sends and accepts SNMP protocol messages on the agent ' sSpecified transport addresses.Accept A session request from subagents-Implements the agent role Elements of Proce
GenerallyWhen calculating the CPU usage of a vro.When calculating the utilization rate of a half-duplex 10 M interface, you can select the variable -- use the variable of mib ii (rfc2233) or the variable provided by a specific vendor. In the case of mib ii variables, the application calculates the percentage manually according to the following steps:1. Calculate the (difference) between the two samples of i
use of Sniffer Pro. The following is my learning experience over the past few years.
I. network topology: Network Management Learning Environment
Required for this networking
Device
Is a CISCO3550 switch and a PC. The switch supports the SNMP protocol and runs the Sniffer Pro and MIB browser programs on the PC. The Park extension is as follows:
Device
IP address
CISCO3550 switch
10.66.0.1
Conclusion: Using net-snmp to develop an SNMP proxy client
I have been working on the SNMP proxy for some time ago. From ignorance to project completion. Some summaries are written here and shared with those who need them.
1.Develop MIB files
The MIB file format is: start line; import; start from the root node, layer by layer, each layer can find dependencies on the upper layer. For specific implementatio
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.