Starting a local Webserver for Testing

Easiest way is to open a console window in what you would like to have as root directory of your webserver and start

python -m http.server

Then, by serving to http://127.0.0.1:8000 you will be able to view and browse the contents.

To specify a port, just add the port number to the command, for example

python -m http.server 9999

Please not that this webserver does not support https, so you have to enter the URL with a starting http:// and you might have to click away a browser warning because of the unsecured site.

Therefore, only use this for local testing!

Use TortoiseSVN without Passwort

Tortoise SVN has an option for saving authentication, but it does not work for SVN. In order to save the authentication, go to Tortoise settings, for example by right clicking in the Windows Explorer and then selecting Tortoise > Settings. In the settings window, select Network. Then add the path to Tortoise Plink (it is in the “bin” folder of the Tortoise installation) and add an option for a username and password using options -l and -pw.

For example:
“C:\Program Files\TortoiseSVN\bin\TortoisePlink.exe” -l foo -pw bar

 

Missing fonts when starting X-application on Linux

Recently, I got the following error message when I tried to start an X-application under Linux:

Some fonts seem to be missing in your system, you should install either xfonts-100dpi or xfonts-75dpi and then restart Xorg to get xboard running.

I got this error message despite having the packages xfonts-100dpi and xfonts-75dpi installed. After scratching my head for some time I found the problem: I was running the application via ssh with X-forwarding from a Windows PC. And the Xserver was actually running on Windows, namely the Xming application.
The problem was quickly fixed by downloading the font packages from the Xming page.

How to test the thread limit on Linux

/* compile with: gcc -pthread -o thread-limit thread-limit.c */
/* originally from: http://www.volano.com/linuxnotes.html */

#include <stdio.h>
#include <unistd.h>
#include <pthread.h>
#include <stdlib.h>

#define MAX_THREADS 100000
int i;

void run(void) {
char c;
if (i < 10)
printf(“Address of c = %u KB\n”, (unsigned int) &c / 1024);
sleep(60 * 60);
}

int main(int argc, char *argv[]) {
int rc = 0;
pthread_t thread[MAX_THREADS];
printf(“Creating threads …\n”);
for (i = 0; i < MAX_THREADS && rc == 0; i++) {
rc = pthread_create(&(thread[i]), NULL, (void *) &run, NULL);
if (rc == 0) {
pthread_detach(thread[i]);
if ((i + 1) % 1000 == 0)
printf(“%i threads so far …\n”, i + 1);
}
else
printf(“Failed with return code %i creating thread %i.\n”,
rc, i + 1);
}
exit(0);
}

Additional information

If you are an administrator of a server, you can configure various limits in /etc/security/limits.conf

New simulation server: roadrunner

nes-servers

Computation speed for a parallizable numbercrunching problem: red:our new server, blue:two other servers, green:a fast laptop in comparison

The institute has a new number cruncher at your service!

roadrunner.nes.aau.at

It can run up to 24 parallel threads and is now our fastest server.

You can log in with your university LDAP account, the server is only available from NES network (or via VPN). It runs Ubuntu 12.04 LTS and provides the same software set up as feynman.

“Ping” a specific port

“Cannot connect to server”, but why?
First diagnosis is usually trying to ping the server, however sometimes it is useful to check if a particular port is reachable from your computer. So these are your tools:
  ping
gives you information if the server is up and on the time a packet needs to travel to the server and back
  nmap -v -A host
scans all open ports on the server and lists them. Useful to check which services are running.
  telnet host port if the port is reachable, the answer looks like this
    Trying 123.123.123.123...
    Connected to filesrv.nes.aau.at.
    Escape character is '^]'.

Instead of telnet, any other terminal program (for example putty) can be used as well.

Shutdown/Restart using Remote Desktop

When you are using the Remote Desktop protocol to control a remote Windows computer, there is no option for Shutdown or Restart in the Start Menu.

If you actually want to restart the remote machine, you need to do press CTRL-ALT-END (STRG-ALT-ENDE on german keyboard) and then select either Shutdown or Restart.

New URL of the NES Intranet wiki

I just wanted to let you know, that we moved the NES Intranet wiki from http://wwwintra.nes.uni-klu.ac.at/wiki/ to https://wiki.nes.aau.at/wiki/. The new wiki has the same content and functionality of the old one (well actually more, as the login should work again). Please try to login and see if it works. Should you experience any problems, please send an e-mail to nes-help@aau.at. The SSL certificate is currently self-signed and will prompt for an security exception. I will try to get a ‘real’ certificate as soon as possbile.