s's profile (3383 points)
About:
Does anybody know a good (if possible opensource) disk usage reporting tool that would report disk usage in a graphical fashion. Something along the lines of xdu, baobab or kdirstat, but as HTML.
The closest to what I need that I've found so far is durep. Unfortunately, the performance is not good enough for my purpose (takes over 24 hours to generate the database). gt5 is not workable either as the report is one huge HTML file.
Ideally, it could take as input the output of "du -ak".
Asked in: Linux-Servers
(5 answers)
s's response: Well, torta will only display directory components that are represented by a sector of an angle below 2 degrees, so by filtering the output of du to only include entries with a size >= totalsize*2/360, it can cope with any directory size. It won't give anywhere near as much information as kdirstat, but it's still good to quickly spot abnormalities in disk usage, and it's quite efficient.
So for now, I use that plus a sorted du -a --time output.
| |
How do I replace whitespace in a variable with nothing, ie delete it ?
What's the best tool ? The variable could be:
$variable = "Just a sentence";
and I'd like it to be: "Justasentence".
Thanks !
Asked in: Linux-Servers
(5 answers)
s's response: A note on sed's \s. Note that it's not standard, only found on some implementations like GNU sed.
The standard equivalent would be:
sed 's/[[:space:]]//'
But note that that includes more that space and tab. The [:space:] character class includes ^I (HT, \t), ^J (LF, \n), ^K (VT, \v), ^L (FF, \f), ^M (CR, \r). But sed won't remove \n.
tr -d '[[:space:]]'
would remove LFs as well.
| |
There's something that just baffles me right now and I'm out of ideas. Would anybody have some idea?
Basically, I have a Dell PowerEdge R415 rack server. Running xen 4.1 with a debian squeeze dom0. On two occasions (and now is the second one), I see weird behaviours as follows:
I've got a ssh connection open from my workstation to the server and it works. However, I cannot ping it nor establish new TCP connections. I can see the packets go out of the workstation interface, the switch claims it forwards it to the server, but I cannot see them on the server with tcpdump, nor do the interface statistics increase. I can see the same from other workstations while others are OK.
What really baffles me is that there is an established and working ssh connection.
Initially, I was seeing the "dropped" statistics increase, and ethtool -S eth0 on the server showed some rx_fw_discard, but after increasing the rx ring buffer that went away, but still same problem.
There's a bridge br0 with eth0 and the virtual interfaces for the Xen domUs, everything looks fine there.
That server has a BMC with a net interface with a different MAC address. I can ping the bmc from my workstation, but not from the server. That BMC shares the same physical network connection (I'm not sure how that works, if there's an internal bridge in the server, could it be where the problem lies?)
That's a Broadcom Corporation NetXtreme II BCM5716 Gigabit Ethernet
# ethtool -i eth0
driver: bnx2
version: 2.0.2
firmware-version: 5.2.3 NCSI 2.0.11
bus-info: 0000:02:00.0
From dmesg, the link went down a few times. I think the problem started to occur when a message like:
NETDEV WATCHDOG: eth0 (bnx2): transmit queue 7 timed out
appeared in dmesg.
Any idea?
Update (2011-05-11)
- same problem with opensuse with Xen 4.1 and 2.6.37-xen dom0 kernel.
- upgrading to bnx2 2.0.23b from Broadcom's site improves matters (at least if I boot with this one, not if I unload the old one and load this one) especially if I increase the size of the receive ring buffer.
I'm under the impression that those ethernet adapters do things at level 3 and 4 which worries me a bit
Asked in: Server-Networking
(8 answers)
s's response: strace on what :-) ?
I might be speaking to soon, but I think I finally found a/the solution. To sum up, it now works with:
1- bnx2 driver updated to latest version from Broadcom (among other things, it allows a bigger receive ring buffer)
2- increased the rx ringer buffer to maximum size (4080)
3- increase coalescence rx-frames and rx-usecs to get fewer interrupts
4- allocated and reserved 2 CPUs to the dom0 (dom0_max_vcpus=2 dom0_vcpus_pin added to xen boot args, cpu-pins for guests not to include the first 2 cpus)
5- increased dom0 scheduling weight: xm sched-credit -d Domain-0 -w 512
Of those, only "4" I know is necessary. I've not tried with reverting the other ones, but now that I've got something running at last, I don't want to break it.
I now even have a domU with PCI passthrough to one of the ethernet cards/ports and it works fine.
| |
I have a new Server - SSH logins work but take forever to start up.
My bandwidth is fine. I can't begin to guess what it is.
50 of my points available for help, it's driving me nuts.
Asked in: Server-Networking
(8 answers)
s's response: If it's a DNS resolving issue, it's easy to check:
on the server, after login via ssh (the one that takes ages), run
getent hosts ${SSH_CLIENT%% *}
if that takes ages, then that's the issue. If not, try a getent hosts on the hostname returned by the command above.
If it is due to DNS resolving issue, best would be to resolve your DNS issues. If that's not possible you can put "UseDNS no" in your sshd_config.
Is the server running ubuntu? Then it could also be due to the pam_motd PAM module that on some ubuntu version dynamically generates a /etc/motd file upon login, and that can take a very long time.
It would be helpful to see the output of ssh -v hostname and see where it hangs.
You may also want to change the sshd LogLevel to "debug" to get more information. Check your syslog configuration to see where sshd messages end up. The could be found in /var/log/syslog, /var/log/auth.log, /var/log/messages, /var/log/secure, even /var/adm/messages depending on the system.
| |
| | |