Questions tagged [debugging]

Finding problems in a program and trying to solve these.

202 questions
255
votes
6 answers

How to see stdout of ansible commands?

How do I see stdout for ansible-playbook commands? -v only shows ansible output, not the individual commands. It would be great if I could figure out how to do this immediately, so if something fails or hangs I can see why. e.g. - name: print to…
QuinnBaetz
  • 2,659
  • 2
  • 12
  • 3
102
votes
8 answers

How to make bash scripts print out every command before it executes?

For example, I have a simple bash file #!/bin/bash cd ~/hello ls How can I make it display every command before executing it? Just the opposite effect of "@echo off" in windows batch scripting.
Epeius
  • 1,031
  • 2
  • 9
  • 6
58
votes
10 answers

How to setup a fake SMTP server to catch all mails?

I'm looking for an smtp service that essentially obeys the RFC, except rather than sending mail it simply logs to a file [date] sent mail to
Or whatever. I can bash this together with the bare minimum of functionality I need in python in…
richo
  • 948
  • 1
  • 7
  • 16
53
votes
4 answers

How can I find out what is causing interrupts on Windows?

Occasionally I come across servers (Windows 2003 and 2008) with high processor % interrupt time. Is there a way to see what program or device is causing the interrupts?
jlupolt
  • 914
  • 1
  • 7
  • 10
52
votes
6 answers

Debugger for Iptables

I'm looking for an easy way to follow a packet through the iptables rules. This is not so much about logging, because I don't want to log all traffic (and I only want to have LOG targets for very few rules). Something like Wireshark for Iptables. Or…
Chris Lercher
  • 4,152
  • 9
  • 35
  • 41
42
votes
3 answers

Debugging rules in Iptables

How can I know how many packets were dropped by my iptables rules ?? Is there any debugging mechanism to see which rule is Dropping my packet or Accepting it ??
codingfreak
  • 591
  • 1
  • 7
  • 15
26
votes
5 answers

Send bash -x output to logfile without interrupting standard output

Is there a way to send the information displayed by running a bash script with the -x option to a file, while not changing the standard output seen by a user running the script? This is a debugging feature I would like to implement in a bash script…
23
votes
5 answers

Kernel stack trace to source code lines

Given a kernel stack trace as below, how do you determine the specific line of code where the issue occurred? kernel: [] __link_path_walk+0x173/0xfb9 kernel: [] mntput_no_expire+0x19/0x89 kernel: …
tylerl
  • 15,055
  • 7
  • 51
  • 72
17
votes
2 answers

ext4 listing of files very slow in one specific directory that contained lots of files before

Background I had a small logrotate misshap... Logrotate would rotate the archived logs by misstake causing a quadratic growth of files in my /var/log/. And by the time I caught wind that something was awry, /var/log/ already contained a few million…
Emma
  • 394
  • 3
  • 12
14
votes
9 answers

Equivalent of SysInternals FileMon for Linux?

I'm attempting to debug an application on Ubuntu - I need to listen to file open attempts (even for files that don't exist). Process Monitor (formerly known as FileMon) is available on Windows - what's on Ubuntu's utility belt? Thanks! Ashley
chickeninabiscuit
  • 1,104
  • 6
  • 20
  • 33
11
votes
12 answers

What's the first thing you check when an untouched unix server starts going berserk?

So you have this neatly setup unix server and it's super fast and works swell and everything is great for months, and suddenly all kinds of weird errors start showing up for a variety of different services and none of them make a lot of sense on…
kch
  • 4,592
  • 3
  • 20
  • 17
11
votes
6 answers

Failed Request Tracing XML fails to display in Internet Explorer (IIS 7.5)

I have installed the Tracing feature and enabled failed request tracing for a website, to debug a Classic ASP website. The XML logs are created upon occurring errors, however when I open them in IE, instead of getting the nice blue interface I get a…
pilau
  • 281
  • 1
  • 3
  • 8
11
votes
2 answers

How to trace Apache 301 Moved Permanently?

I have one virtual host on my machine, which I am accessing localy. I am running apache2 under windows 7. When accessing this host, I see in Fiddler, that server redirects browser to different remote site with response 301 Moved Permanently But I…
Suzan Cioc
  • 251
  • 1
  • 5
  • 13
11
votes
4 answers

How can I find out where a file is physically located on the disk (block numbers)?

This is an obscure question, I know. I'm trying to do some performance testing of some disks on a Linux box. I'm getting some inconsistent results, running the same test on the same disk. I know that disks have different performance depending on…
Rick Koshi
  • 917
  • 3
  • 14
  • 22
11
votes
2 answers

How to enable debug of dhcp client on Windows 7

Is it possible to enable some sort of debugging for dhcp client on Windows 7?
pchel
  • 151
  • 1
  • 2
  • 6
1
2 3
13 14