Hot answers tagged

138

cat /proc/<pid>/environ If you want to have pid(s) of a given running executable you can, among a number of other possibilities, use pidof: AlberT$ pidof sshd 30690 6512 EDIT: I totally quote @Teddy comment to achieve a more readable output: xargs --null --max-args=1 < /proc/self/environ


32

Since this question has a unix tag and everyone else has done such a great job addressing linux tag, you can get this information on OS X and other BSD-derived systems using ps -p <PID> -wwwe or ps -p <PID> -wwwE and on Solaris with /usr/ucb/ps -wwwe <PID>


25

The file ibdata1 is the system tablespace for the InnoDB infrastructure. It contains several classes for information vital for InnoDB Table Data Pages Table Index Pages Data Dictionary MVCC Control Data Undo Space Rollback Segments Double Write Buffer (Pages Written in the Background to avoid OS caching) Insert Buffer (Changes to Secondary Indexes) ...


19

First Order: Is it responsive? If you can't log in, there's bigger problems afoot. This generally comes in two flavors: hardware failure, and software failure. Both are potentially catastrophic. To prevent DFA errors, check the general hardware health first - a simple glance-over usually will suffice. Second Order: Are the system's underlying structures ...


19

Its a time bomb Backup the hard drive right now if you don't have a backup already (professionals should be taking regular backups of critical data anyway). You might also consider cloning the drive if you have the required software or hardware; both to ensure you have everything and to make a replacement drive. I do not suggest shutting the drive off if ...


17

As others have mentioned, on Linux, you can look in /proc but there are, depending on your kernel version, one or two limits: First of all, the environ file contains the environment as it looked when the process was spawned. That means that any changes the process might have made to its environment will not be visible in /proc: $ cat /proc/$$/environ | wc -...


16

Just a list of points I wrote down for myself after fighting with a problem for a while: What is your primary goal ? Should be stated clearly and as concisely. The goal should be very particular. It should not be general. Preferably one sentence. What is your problem ? Is there just one problem or many ? If there are many, solve them one at a time. Try to ...


16

There are three concerns as I see them: Changes to the physical workspace, changes to computer-specific properties, and changes to user-specific properties. I would tend to err on the side of treading lightly re: changes to the workspace. Common sense says that making any changes to the physical workspace is a bad idea, IMO. That would include changing ...


14

If the problem is Internet-related, it's probably the DNS. If the problem is hard to diagnose, it's probably the RAM. If the problem is with a Windows workstation, it's probably quickest to reimage it. If the problem is on a Friday, it's probably something serious.


14

Load is a very deceptive number. Take it with a grain of salt. If you spawn many tasks in very quick succession which complete very quickly, the number of processes in the run queue is too small to register the load for them (the kernel counts load once every five seconds). Consider this example, on my host which has 8 logical cores, this python script ...


12

On Linux at least, the load average and CPU utilization are actually two different things. Load average is a measurement of how many tasks are waiting in a kernel run queue (not just CPU time but also disk activity) over a period of time. CPU utilization is a measure of how busy the CPU is right now. The most load that a single CPU thread pegged at 100% for ...


11

This isn't totally unheard of, a machine may have had an alias assigned to a network card previously which the network admin doesn't know about, etc. The obvious thing to do is find the MAC address of the responding server, that should be easy to do. Run "arp -a" from a command prompt on the SQL server, and look for both the 10.40.1.205 and 10.40.59.69 ...


11

Debian bug 666021 seems to be a report of this same issue. The suggestion there is: #change value for this boot sysctl -w vm.min_free_kbytes=65536 #change value for subsequent boots echo "vm.min_free_kbytes=65536" >> /etc/sysctl.conf http://russ.garrett.co.uk/2009/01/01/linux-kernel-tuning/ has some discussion of when altering this setting may be ...


10

I like to fall back to the scientific method. From (http://en.wikipedia.org/wiki/Scientific_method) Define the question Gather information and resources (observe) Form hypothesis Perform experiment and collect data Analyze data Interpret data and draw conclusions that serve as a starting point for new hypothesis Document Results As ...


10

(These highlights are paraphrased from the "Debugging" chapter of "The Practice of System and Network Administration") Two things to know: Know what the "fixed" version looks like. Preferably a command you can run that gives a certain output when things work. For example: I'm trying to figure out why SSH asks for a password when I've set up the keys ...


9

Let me start with the list: General: Install most current updates/service packs. Verify drivers, look for conflicts, upgrade to newer ones. Use Process Explorer to see a bit more details about what's being run Use Process Monitor(combined filemon and regmon) to see details about particular process Check the services - (services.msc from command prompt). ...


9

tcpdump and wireshark are your friends. I find that watching packets on the wire of a 'slow' network vs a 'good' network is usually what pinpoints a problem. There are many types of 'slow'. You can track latency to local and internet sites using a tool like SmokePing. (SmokePing can be configured to track ICMP latency as well as service latency from TCP ...


8

Something that we use is SQLH2 (SQL Server Health and History). It's created as an add on pack from Microsoft and has a good set of "get you going" reports for SQL Servers, and it's free! SQL Server Health and History MSDN If you are only looking for periodic heath checks, then you can set these reports up on a schedule to email them to you weekly. If ...


8

I use to do perl -MPOSIX -e 'print strerror($ARGV[0])."\n";' 13 You can just put the Perl code in a file and have it in the path. Of course it can be done using C as well


8

When a drive detects a bad sector/cluster, depending on the type and recoverability of the error, it will sometimes reset the head position. The head motor is reset, and it returns to its spring-loaded park position. As a result it moves way over to the side of the drive. If it was far enough and was reset unexpectedly enough, the head swing arm hits the ...


7

To check the latency on a network: Run a continuous ping from the command line: ping -t [destination IP DNS or hostname] Do this: From your PC to the users PC Your PC to the file server Your PC to Internet sites etc. If any of these are slow, then run: tracert [destination IP DNS or hostname] to see where the issue is. To check the bandwidth of a ...


7

Is the system running an existing version of Windows? Then you should just be able to extract the contents of the iso (say with winrar or virtual clone drive) to another partition and run the setup.exe. Here's a guide.


7

cat /proc/PID/environ replace PID with the PID of the process you want to see. Every information about a running process is under /proc/PID/ directory example: cat /proc/32512/environ


7

It sounds like your server is IO bound - hence the processes sat in D state. Use iostat to see what the load is on your disks. If MySQL is causing lots of disk seeks then consider putting your MySQL data on a completely separate physical disk. If it's still slow and it's part of a master-slave setup, put the replication logs onto a separate disk too. ...


7

First, I must ask: "shutdowns"? Do you mean that the machine reboots or does it actually halt? If it halts, it is either misconfigured (perhaps in BIOS) or something is actively shutting down the machine (i.e. init 0). If not, your primary candidate would be /var/log/syslog and /var/log/kern.log as your problem sounds like a kernel panic or a software-...


7

To check top 20 largest consumer of physical memory (resident set size). crash> ps -G | sed 's/>//g' | sort -k 8,8 -n | awk '$8 ~ /[0-9]/{ $8 = $8/1024" MB"; print }' | tail -20 To check the number of hugepages. crash> p -d nr_huge_pages Update: A) crash dump was captured from following kernel version. $ crash --osrelease vmcore.flatĀ  2.6.32-...


7

That file is ibdata1, not ibdatal and it contains all of your InnoDB databases. If you delete it, you lose all your data. For some ideas on how to deal with it, see How to shrink/purge ibdata1 file in MySQL.


7

Setting up a wireless network in a 4000 square foot space requires either an extremely knowledgeable installer, or having someone who owns some proper testing equipment. You will need to do a survey of the room, including finding out what sort of background noise there is, and if there are other networks on the same spectrum. You will then have to plan the ...


7

A router's job is to route packets. It's not a ping responder. It can route packets just fine even if it can't respond to pings. Since you're seeing latency of less than a hundredth of a second to the hop after it and no packet loss, I'd say it's routing just fine. How can hop 7 be smaller than 6 and 8 smaller than 7 and 6!?? Shouldn't the pings be ...


6

The cache is in %SystemRoot%\CSC folder, but MS says you shouldn't edit that manually. Here's the KB to re-initialize the cache: http://support.microsoft.com/kb/230738 You could also ctrl-shift-click the "Delete Files" button in the "Offline Files" tab under explorer->Tools->Options. If you just want to sync to the new server, csccmd.exe /moveshare, from ...



Only top voted, non community-wiki answers of a minimum length are eligible