Tag Info

Hot answers tagged

39

If you have a recent enough kernel and version of iptables you can use the TRACE target (Seems to be builtin on at least Debian 5.0). You should set the conditions of your trace to be as specific as possible and disable any TRACE rules when you are not debugging because it does spew a lot of information to the logs. TRACE This target marks packes so ...


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 ...


18

Directories only ever grow in size, not shrink. Try moving all those files out into a a temporary directory (like log2) then rmdir the old directory and rename the temp one as the new permanent one.


15

If you have python lying around this will write the SMTP conversation to stdout. sudo python -m smtpd -n -c DebuggingServer localhost:25 http://docs.python.org/library/smtpd.html#debuggingserver-objects


11

I don't have a ~= RHEL5 at hand, so the output shown is from a Fedora 20, though the process should be mostly the same (the name of the function has changed). You'd need to install the appropriate kernel-debug-debuginfo package for your kernel (assuming RHEL or derivative distro). This package provides a vmlinux image (an uncompressed not stripped version ...


10

On another Linux distribution I use, the naked -connect verb doesn't actually import the root CA packages installed on the system. To get that, you need to add -CApath /etc/ssl/wherever/, where the path is the location of the root CA certificate bundles. Without CAPath: CONNECTED(00000003) depth=1 C = ZA, O = Thawte Consulting (Pty) Ltd., CN = Thawte SGC ...


10

When it comes to a single computer, generally you want to get a packet capture and then do some analysis on the packet capture that includes things like: Protocol Breakdown Packets Per second Top senders receivers etc I recommend using wireshark or maybe Microsoft Network Monitor. With Network Monitor you will get a process breakdown of the capture which ...


7

Here's one. You can also use a regex tester like this one, or this one.


7

It depends on what you want: In the large, you want to look at inotify to see all file accesses that any process makes. In the small, strace will let you watch the syscalls a particular process makes. Strace is pretty awesome. You can trace a process's calls to 'open' by doing strace -f -eopen $cmd, for instance. The man page has full details on syntax, ...


7

If you have a recent enough kernel and version of iptables you can use the TRACE target (Seems to be builtin on at least Debian 5.0). You should set the conditions of your trace to be as specific as possible and disable any TRACE rules when you are not debugging because it does spew a lot of information to the logs. TRACE This target marks packes so ...


7

I guess the answer wasn't here because it's so simple! Here's what I figured out: Open SQL Server Profiler (in Performance Tools) File -> New Trace... Connect to your database Click the Events Selection tab Select only events which correspond to SQL queries finishing: RPC:Completed SQL:BatchCompleted Click Column Filters... Click Duration in the list ...


6

You're looking for strace. Have a look here: https://wiki.ubuntu.com/Strace


6

It transpires that this issue was primarily down to my misunderstanding of the output of strace -r. The '-r' option gives the time (in seconds) since the last system call, not the time that the last system call took to execute. In this instance, the CPU was churning away performing some calculation, not processing the brk(). The issue here is now ...


6

I can't think of a direct solution, but I can think of a round about way of tracking a packet. Log each rule with a log prefix directive (--log-prefix "Rule 34") Generate a test packet or packet stream with scapy and set the TOS field to something unique grep the log file output for that TOS setting and see which rules logged it.


5

usually "who" followed by "last" a heap of issues on machines I've managed over times have been because of a very loose definition of "untouched" - often someone has done something :)


5

Another method of debugging your rules is to add an identical rule to the one you're interested in, but set the action to being: -j LOG --log-prefix "rule description" Every time your rule matches, you'll get a line in syslog with lots of useful information about the packet.


5

You should have a look at smtp-sink which is a part of Postfix. You don't have to run Postfix to make it work. Just install it to have the executable. Everything you need can be configured via command line parameters: http://www.postfix.org/smtp-sink.1.html


5

You can use the FIBMAP ioctl, as exemplified here, or using hdparm: / $ sudo /sbin/hdparm --fibmap /etc/X11/xorg.conf /etc/X11/xorg.conf: filesystem blocksize 4096, begins at LBA 0; assuming 512 byte sectors. byte_offset begin_LBA end_LBA sectors 0 1579088 1579095 8


5

Given an unstripped vmlinux with debugging symbols (typically included with "linux-devel" or "linux-headers" packages matching your kernel version), you can use the addr2line program included with binutils to translate addresses to lines in source files. Consider this call trace: Call Trace: [<ffffffff8107bf5d>] ? finish_task_switch+0x3d/0x120 ...


5

The strace command lists the systemcalls the application make as it is running. If you're not de developer: Section 2 of the system manual documents systemcalls helping you understand what is happening. man 2 poll DESCRIPTION poll() performs a similar task to select(2): it waits for one of a set of file descriptors to become ready to perform ...


4

What you can do is to just set up development Apache and use RewriteLog, and set RewriteLogLevel high (above 3).


4

Well, I'll start. This one bit me once, I spent hours trying thousands of different things, disabling services here and there, rebooting, etc. What was the problem? Totally out of disk space. So, here's the first thing I type when debugging a suddenly troubled server: df -h I never forget that now. It just saved me lots of wasted effort. Thought I'd ...


4

Yes. In order to use the T-SQL debugger, members must be members of the sysadmin fixed server role. That gives them complete rights over the SQL Server. That's not something you want to give out to developers in a QA or production environment. Development may be a different story. Reference: SQL Server 2008 Books Online - Configuring and Starting the ...


4

brk() is how malloc expands its available memory pool. This means it that the kernel could be swapping or playing memory shell games to find a large enough new memory segment to hand back, so performance is... unpredictable. That said, you might want to look at some of the memory-use tunables (sysctl -a | grep ^vm should give you a good place to start ...


4

Three answers on one post: 1) Debug by script: #!/bin/bash debug() { if [ -n "$debug" ]; then $@ || echo -e "The command which launched the error:\n$@" else $@ fi } debug=1 IPTABLES="debug /sbin/iptables" $IPTABLES -P INPUT DROP $IPTABLES -P OUTPUT DROP .... 2) Debug by syslog From this website ...


4

Figuring out the root cause of a problem depends on the problem -- Your initial instinct to look at log files/sysinternals tools/packet sniffers is generally correct. I would add running the MS Malicious Software Removal Tool and a good AV program on Windows systems (and ensuring that they don't have something like CyberDefender or other AV-trojan-malware. ...


4

You could use debugfs for this: debugfs -R "stat ~/myfile" /dev/hda1 Change the hard/partition drive accordingly and make sure the drive is unmounted. You will get a list with all the blocks used: BLOCKS: (0):1643532 TOTAL: 1


4

This thread may give you some insight into ext4 file placement algorithm. debugfs has a bmap function, which seems to give the data you want. You should be able to give it consecutive blocks of a file and get the physical block numbers.


4

Have you ever tried waiting to see what HTTP status code returns? To debug this case, open 2 terminals: in the first, ssh to your server and type: # tcpdump -vv -s0 tcp port 80 -w /tmp/example.pcap (you can also append and src host <client_IP> to filter junk requests) and in the second, use wget to browse your website, reproduce this problem and ...


4

Step 1: telnet to port 3389 on the box. If you cannot connect with telnet to the port, you have a network or firewall issue. If you can connect, you have an RDP protocol issue. Step 2: given that you have a RDP protocol issue, boot a Ubuntu Live CD (or similar) and try to connect using rdesktop. It may give you a different error message. If you have a ...



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