I have this code:
int a;
printf("&a = %u\n",(unsigned)&a);
printf("a\n");
printf("b\n");
printf("c\n");
printf("d\n");
I tried to print the pointer of a variable.
But it fail on the row printf("a\n"); and says Segmentation fault (core dumped)
Output:
&a = 134525024
Segmentation fault (core dumped)
When I remove the row printf("&a = %u\n",(unsigned)&a); from the code, its success.
Output:
a
b
c
d
What worng in my code?
We have a Linux server acting as a router/firewall for our office. Occasionally someone will upload a large file that takes up all our bandwidth. I don't want to implement any complex rules or traffic shaping, but I'm wondering if there is a way to slow down a single connection on the spot? I found tcpnice, but it doesn't slow down the transfers in my testing.
This is the /etc/fstab entry of a raid system /dev/md4 that is controlled with mdadm and webmin on an ubuntu 10.04 64 server:
/dev/md4 /mnt/md4 ext3 relatime 0 0
We tried to switch off automatic forced fsck on rebotts, as we prefer to implement our own scheduled fsck routine by setting the last parameter of the line to 0 (ZERO).
But we found out the forced and automatic check still occurs on the underlying real disks, lets say sdb1 and sdc1.
How can we switch that off?
Top-like utilities are extremely handful in my work and I want to make sure I am not missing any of them. Please extend the following list of performance monitoring (top-like) family of linux tools:
top - original tool
htop - adds support to multicore/cpu
iotop - input/output monitoring
iftop - network monitoring
atop - merges previous elements into a single overview
slabtop – displays a listing of the top caches
?
The only criteria - maturity and similarity in function/style.
On Mac machines the user can schedule the machine to power-on automatically, is there anything for Linux that gives us the same ability? I can schedule shut downs whenever I want, it's powering up that I want to do.
I know how to get connected to a Windows share easy enough, and I've read how to change the fstab file to get it to mount at boot.
The real question here is...can I create a few shortcuts on a common user desktop so that regardless of who logs into Ubuntu machine they can open that shortcut and it will open the Windows share?
I would also need to allow AD credentials during login, so a link to that will help as well, but I'm sure I can search google for that part.
I have mounted a Windows share using the GUI in Ubuntu. Now I would like to access it using the Terminal application. However, I don't know its path. I thought it should be in /mnt, but it isn't there.
I've got some files for a project that's due in a few weeks. The guy sent them in a zipx file. How would I extract the files from a zipx on OS X or Linux?
I forgot my pendrive plugged in when leaving the computer lab yesterday, and I would have lost it if it wasn't for a kind soul finding and returning it. I want to avoid this in the future and apparently there are some tools you can use in windows that warn you if you are leaving a pendrive behind when logging off or shutting down the computer. Is there anything similar that works on Linux?
I need this to work on Fedora 17 (GNOME 3 shell), and preferably without requiring administrator privileges.
i want to list files from dev end at tty bettwen 15 and 24...should appears /dev/tty15,/dev/tty16,/dev/tty17, etc until /dev/tty24
what is the command?
Before I plunge into the depths of how to synchronize UID's/GID's across my different Linux machines, I would like to know what is actually the benefit?
I know that this keeps file synchronization relatively easy (as ownership is "naturally" retained). However this can also be achieved otherwise depending on the transmission service.
Is there anything else that would benefit from consistent UIDs/GIDs?
You probably all know the relatively simple RAID boxes exporting a bunch of SATA disks as one big drive via FC, SAS or iSCSI, like the HP StorageWorks MSA2000, Infortrends EonStore series or many different other models from different manufacturers.
Is it possible to create such a device with Linux, a few disks and an FC controller, using the controller in the reverse direction than usual?
This would come handy to test some ideas and concepts in an emerging SAN environment.
I want to add usb network support to a real-time Linux distribution we're using at work.
USB devices are recognized, but when connecting a usb network adapter no network interface is created.
From what I've read this requires recompiling the kernel build with usbnet support enabled. I don't mind doing this, but the problem is that I can't seem to find any instructions on how to do this. Can anyone point me in the right direction?
I have about four or five machines in the Pentium 3-4 era and I'm interested in creating a Linux server comprised of these machines. The server's main purposes would be to host several low-medium traffic websites/services (voice and game), and share terabytes of data on a local network.
I could probably throw together one modern computer as a server and call it a day, but I'm interested in using these machines to do it instead. Where would I get started in this cluster/cloud setup?
I'd like to be notified via email if our Linux servers are under any kind of hacking attempt or service attack. Is there some kind of all-in-one solution that can monitor for suspicious activity and send reports of said activity to an email address?
I am trying to install anything on my machine, It's giving error saying
"Following package has unmet dependencies"
Try apt-get -f install ..
but still same error if using apt-get -f .........
I installed unbuntu on virtualbox. The problem I have is that the settings don't get saved. Everytime I restart the server, it takes me to the main menu. (language settings etc)
This came up in relation to this question on determining chunk size of an existing RAID array.
The general consensus seems to be that chunk size does not apply to RAID1 as it is not striped. On the other hand, the Linux RAID Wiki claims that it will have an affect on read performance. However, I cannot find any benchmarks testing/proving that. Can anyone point to conclusive documentation that it either does or does not affect read performance?
i'd like to build a similar replica of the virtual server i hire from my hosting company in order to test a windowless application of firefox using Xvfb.
i'd like to do so using a parallels virtual machine on OSX.
i'm happy to run some commands to get info but i'm pretty much a linux noob so be gentle!
at the moment this is all i really know:
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
thanks :)
I always thought that microsoft gets $$$ indirectly by selling more windows copies & visual studio by investing on .NET framework.
but why is microsoft allowing asp.net & .net to run on non windows systems like linux through mono & monodevelop?
I hope Microsoft will not sink because of this.