A site for solving at least some of your technical problems...
A site for solving at least some of your technical problems...
As I upgrade to 14.04, I started seeing this error in my console:
no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory
Quite cryptic if you ask me, but the "leaking memory" did sound bad.
The error would in particular appear when I used sudo for whatever reason, for example:
sudo iptables -L -nvx
So... something to do with sudo?
I found the answer on the Ubuntu forum. The solution is to turn off a feature of samba. Run the samba setup tool in your console:
That opens a curses window in your console. You should then see an option ...
Today I wanted to test the memory on a remote server. I could not just reboot and run memtest86+ so instead I had to look for a different solution to testing most of the computer memory without having to reboot...
I found an interesting page in that regard describing a way to do so using md5sum on a very large file.
The is a verbatim copy of the Linux command line proposed.
dd if=/dev/urandom bs=768304 of=/tmp/memtest count=1050 md5sum /tmp/memtest; md5sum /tmp/memtest; md5sum /tmp/memtest
The size, 768304 is expected to be close to your memory size. You should know how much memory
Whenever you run many applications on a server, such as many instances of your web server (i.e. Apache), you may want to know how much of the system is being used. This can be important to avoid overloading your system.
The load is computed by the kernel. The kernel knows how many processes are running and how much processing power your server has (i.e. how many processors.) With that information, it infers how many processes are being held back for a period of time. The default periods are 1, 5 and 15 minutes (I'm sure you can recompile your kernel with different timings!)
Yesterday, I got a nice little surprise...
I inadvertendly added two copies of an uncompressed MS-Access data in my CVS. The files were over 400Mb (about 434Mb if I'm correct.) This started okay, then slowly I could see my memory going banana.
Wow! It took a good 20min. to check-in. My CVS is on my computer, so it is not the transfer that's slow... The fact is, the allocated a buffer for the entire file! My computer was on its knees!
The at command is often used to start a process at a later time. It can run any script at a specified date and time.
For instance, if you want the computer to send you a signal in one hour, use something like:
cat signal | at -q z now + 60 minutes
Assuming that the file named signal contains the commands necessary to generate the signal. Then in 60 minutes, the script will be execute and the signal will be heard or shown.
Like many programmers, I switch between languages quite often.
I have worked with BASIC before since I had an Apple //c and used other Apple ][ computers that had some (really bad, early) BASIC language in their ROM.
At the time, the worst part was the line numbers. You had to write in BASIC as if you were writing assembly language. And I'll skip the numerous problems with memory...
Pre-Pre-Scriptum: Please, look for the edll library. It is now available as a free library for MinGW.
For a long time now I've been looking for a way to check out the temperature of my computer while Linux is running. I had heard about ways to do it but never actually knew how to make it work.
After quite some research, I found a tool used to show all sorts of status on your computer. The author said something about the temperature of the processors and thus I read on. I downloaded the lastest version. Compiled it and got lucky (i.e. it worked right away!). I started it and... hmmm... no temperature.
Find the page/content you are looking for with our index.
All software make use of numbers. Everything is a number. The most basic number in a computer is 0 or 1. This is called a bit. These are represented with electricity. Although in most cases we see it as 0 - Ground and 1 - Voltage (i.e. 1 volt), the bit representation in software and in hardware may be interpreted either way (i.e. a 0 could mean that the voltage is 1V and not 0V.)
Combining these zeroes and ones we offer end users to handle much larger numbers. With 8 bits, you can have numbers from 0 to 255 (unsigned) or -128 to +127 (signed.) Now a day, computers can handle a much larger number of bits in one cycle. Most processors use 64 bits but they can calculate numbers on 128, 256, and for some 1024 bits at once. Also with parallelism, the size can be viewed as even larger (i.e. handling a 64 bit number in 1,536 threads like on my old nVidra Quadro 600 is equivalent to one large number of 98,304 bits! That would be 2 power 98,304 possibilitie or about 2.8359e+29592 in decimal.)
Integers are easy to handle. Although when working on math problems you generally see the set of avaialble numbers as equivalent to N although mathematicians know that computers can really only handle a limited set of numbers. For example, on a 64 bit computer, the usual range is -9223372036854775808 to 9223372036854775807, This is generally enough although at times some equations have to be reworked to avoid really large or small intermediate numbers that work fine in math equations, but not so well on computers.
Now, math also includes other sets of numbers such as D, R, and C. Computers do not offer any way to represent numbers in R or C but they can offer D to some extend. These numbers are called floating point numbers because we do math using an exponent. The exponent makes the decimal point "float" in any location as the number used for the exponent offers. Using a 64 bit floating point, you can have positive and negative numbers with precision varing betwee 10-308 and 10+308. This includes a positive zero (+0) and a negative zero (-0), which is import in a few cases (although +0 = -0 is true, you can get the sign of a number and distinguish both zeroes). Note that at first decimal numbers were going to also have a positive and negative zero, but it was instead decided to have one more negative number (remember, with 8 bits we have signed numbers from -128 to +127, this is because in the positive numbers we have a 0 which we don't have in the negative numbers.)