Programming :: Achieve File Consistency While Using Mmap?
Jul 27, 2010
How can I achieve file consistency while using mmap? I have a block of code that needs synchronized access across processes (not threads). Using threads, one can regulate access to the mmaped portion of the file by locking it using a mutex. How can I achieve the same using different processes, some of which run in different programs?
View 2 Replies
ADVERTISEMENT
Jul 30, 2011
How to achieve interrupts
any sources available apart from kernel code which show the usage of code...
View 2 Replies
View Related
Jan 13, 2010
Is there anyway in Linux that can achieve atomic increment/decrement for an integer variable without being interrupted? It means that the thread should not chance for other thread to run until theincrement/decrement is completed.
View 11 Replies
View Related
Feb 7, 2010
how do I achieve the result but here is the story. I have a script which prompts for the IP Address and read that value and validate if reachable. If not then it should keep on prompting until the IP is reachable. I tried using until loop as well as while loop but dang..Here are the codes
#!/bin/bash
IP_Feed () {
echo -n "Give me IP : "
[code]....
View 4 Replies
View Related
Nov 23, 2010
anytime my external drive gets unplugged improperly, or the laptop shutsdown abruptly (overheating/battery), it's NTFS partition is unmountable. gparted informs me to:
Quote:
run chkdsk /f on Windows then reboot into Windows twice
but i no longer have windows, and would prefer to find a way to restore the drive's functionality without having to visit someone who uses windows every time this happens.is there a way to restore NTFS consistency without windows?
View 4 Replies
View Related
Apr 1, 2010
I have a mdadm RAID5 configuration on my Ubuntu Server (64-bit). In the first week after I configured the RAID, mdadm itself initiated a consistency check automatically. But after that, it won't check the RAID anymore. (the server isn't on 24/7, normally a few hours a day)I've read a post for manually initiating consistency check with these commands
Code:
sudo su -
echo check >> /sys/block/md0/sync_action
[code].....
View 3 Replies
View Related
Jun 16, 2010
I will try to write correctly but be indulgent... so as describe in the title I have a CPU ARM and I want to access a register. i tried with mmap but it doesn't work. i attach my program if someone see the problem... so when I run the program there isn't any error, all works (open, mmap ...) but I know that my program do nothing because i have ask to read something that i know and there is nothing...
View 1 Replies
View Related
Feb 25, 2010
I'm running an embedded Linux kernel, and I want to obtain a real memory address from user space. After goggeling a little, I found that the only way was to use mmap to access /dev/mem. But I never used mmap. I want to load a program in memory, in order to make it available from another processor, that has access to the DDR, but not to the flash memory where program is stored. Here is the code I use:
Code: // Open file and get its size
FILE* program = fopen(argv[3],"rb");
fseek(program, 0, SEEK_END);
long program_size = ftell(program);
fseek(program, 0, SEEK_SET);
// Prepare memory to copy it in
void* program_address = malloc(program_size+1);
FILE* memory_stream = fmemopen(program_real_address, program_size + 1, "wb");
[Code]....
View 5 Replies
View Related
Jun 6, 2010
What GNOME does with pendrives does surprise me. It not only umounts the partitions, but also shuts the device down and turns off the power light. How do I achieve the same effect with CLI? I've tried eject but it does not cut power.
View 10 Replies
View Related
Aug 19, 2011
I'm working on some code from my computer at home and would like to do CVS updates to a remote server. When I'm at work I don't need to type in a password, but at home each time I need to type in my password each time I do a CVS update. I've followed the instructions here on how to set up a passwordless public/private ssh key pair: [URL].. However, after that I still need to type in my ssh password each time I do CVS update (or anything CVS related) from my local computer.
View 1 Replies
View Related
Jun 13, 2010
I have a video I want to convert to another video format that's similar to another video. The video's properties and codecs as follows:
Code:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Vid.mp4':
Duration: 00:02:35.80, start: 0.000000, bitrate: 1731 kb/s
Audio: adpcm_ima_wav, 22050 Hz, stereo, s16
Video: mjpeg, yuvj420p, 128x128 [PAR 1:1 DAR 1:1], 30 tbr, 30 tbn, 30 tbc
View 1 Replies
View Related
Sep 12, 2010
I have install fedora12 in a virtual machine (oracle VBox) in a windows vista host (I know aaarg) and i can't have a fullscreen mode for the fedora I don't know, if it is cause additional features are needed for fedora or is something from the VBox and some additional features of it are needed any special arrangment is needed into the operetional parameters of the VBox.
View 2 Replies
View Related
Jan 25, 2011
I have configured /etc/syslog.conf for writing user level log messages, and it is working fine.
The line which i entered is: user.* /home/shekhar/obj/myjob.log
But the log file keeps increasing. I would like to rotate the log file when it reaches 100Kb.
How do i do that in red hat linux ?
View 1 Replies
View Related
Jan 6, 2010
How to achieve this effect of mouse?which function or api?see the imag:http://linux.chinaunix.net/bbs/attac...Z2uSUDstxs.png
View 6 Replies
View Related
Mar 28, 2011
I'm installing 11.4 as a guest under Citrix's XenServer. The only access to a guest's graphical desktop is via VNC.The problem is that I can't achieve runlevel 5 as X can't find any devices. With 11.3 I was able to run Sax2 and add a dummy screen device to Xorg.conf that it created.When Sax2 was removed from 11.4, what was the fall-back for configuring X?
View 5 Replies
View Related
Apr 29, 2010
copy old backups from 600+ CD/DVD media to a hard disk. Machine: A desktop with 4 DVD drivers, mainboard has 4 SATA conectors and only one PATA conector. My questions are:
1. What tuning can I do to the kernel on a Ubuntu Lucid Desktop to achieve maximum IO to dd/cp/rsync/whatever those medias to hd?
2. What's the best scenario regarding HD/DVD drive connections to mainboard regarding IO/throughput?
The intention is to insert 4 medias at a time and copy them all in parallel to a local hard disk.
View 2 Replies
View Related
Jul 19, 2010
I need to do the following things and googling didn't help much:
1.mount a volume(or windows share, whatever) into a non empty folder
2.both the original content of the folder and the content of the newly mounted volume is accessible
3.updated and newly created files can be written to the mounted volume or the original folder determined by something like a switch at mount time
4.if files with same names exist both in the folder and on the volume, then which file to be presented to the OS is determined by their last modified date/time.
any one can give a walk-through on how to achieve this?
View 5 Replies
View Related
May 27, 2010
i downloaded madwifi0.9.4 because my laptop has an atheros wifi card sadly i am new to linux so do not understand how to build a driver and just downloaded the software add-on windows wireless drivers but could not find an inf file then i see i have to build the thing myself from the kernel. well i am a win7 user wanting desperately to only have to use windows for playing games and do all my work on something more secure and would like to be able to use my laptop in a coffee shop etc.
View 6 Replies
View Related
Apr 7, 2011
I have 2 web servers running apache hosted at 2 data centres on 2 different IP ranges.The 2 servers are an exact clone of each other hosting www.example.com.What I am trying to achieve automatic failover. Say my first data centre gets wiped out, how would customers reach my website on my second server in the second data centre by still typing www.example.com?The aim is for the customer not to notice any difference.
View 3 Replies
View Related
Jan 27, 2011
when i use image magick...in command, use -strip, can remove image's verbose but c++ code, how can i do?
View 1 Replies
View Related
Aug 15, 2011
Having alot of trouble searching for answers as it just pulls up irrelivnent info.I have 2 HDD's id like to show as one virtual disk or mount them both to one folder, but without raid so if i dies the other will be ok. Is this something i can achieve with symbolic links or JBOD raids? or other options ^_^
View 1 Replies
View Related
May 2, 2010
I've used WinSplit Revolution for quite some time on Windows and have become attached to it.I'm now trying out a Linux OS (Ubuntu 10.04) and would really like to get the same functionality back again.After searching on the net I found a "grid" plugin for compiz which says that it was inspired by WinSplit revolution.
I haven't installed the Grid plugin yet, because under the install section on that page, it says "Note that grid is now included in compiz so you're unlikely to need to fetch from git unless you've an old version of compiz", which would seem to suggest that the grid functionality has now been built into compiz somewhere. The thing is, I don't know where to find it in the CompizConfig Settings Manager nor how to set it up. All I want to have happen is that I get identical functionality to WinSplit revolution, where I press Ctrl + Alt + [some numpad key] to position a window on a screen and press Ctrl + Alt + [left or right arrow] to shift a window between dual screens.
View 2 Replies
View Related
Apr 4, 2010
I have a server which time zone is in GMT format. I have a user which is also get time zone variable in GMT. But I want to run script which will start from crontab in EST time zone. For that I�m not suppose to give extra entry in crontab. May be it would be in script.
How can I achieve this?
View 1 Replies
View Related
Jun 23, 2011
I want to set the HTTP_PROXY and HTTPS_PROXY and http_proxy and FTP_PROXY environment variables "somewhere", so all programs that recognise these can find them. I need root to find them for slackpkg and sbopkg, I need users to find them for Dropbox, I need them for cronjobs and scripts and wget.So I want to set these environment variables up somewhere, preferably something in /etc and have them set and accessible for everyone and everything. I am not using KDE or XFCE or any desktop. I need a command line solution.
Where is the best place to put this? I see that some other distros have a /etc/environment and these variables go in there. In Slackware, should I add them as a new file in /etc/profile.d and have them added every time /etc/profile is accessed? Is there a Slackware approved method that I don't know about?
View 6 Replies
View Related
Mar 22, 2015
For the past few months I have been tirelessly trying to get my Asus PCE-AC68 to run with my custom Debian 7 with kali-linux-full installed. I feel i have tried everything (5 or 6 times), and I am very close to the solution. I just need a separate set of eyes. I'm running ESXi 5.1 with Windows Server 2008 R2 to manage my domain controllers, active directory, and IIS server. Everything is running smoothly except for my penetration testing suite. I can get the device to enumerate and even show up on iwconfig, but I cannot get it to enter monitoring mode. I am almost sure it is a modprobe issue.
Here is some common output:
lspci:
Code: Select allroot@debwkstation01:~/Documents# lspci -nn | grep 0280
03:00.0 Network controller [0280]: Broadcom Corporation Device [14e4:43a0] (rev 03)
iwconfig
Code: Select allroot@debwkstation01:~$ iwconfig
lo no wireless extensions.
eth1 IEEE 802.11abg ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=200 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
[Code] ....
I have installed so many drivers...so many restarts...
View 6 Replies
View Related
Sep 11, 2010
I need to find notes on how to achieve higher screen resolution via Xorg.conf and some other fixes since I just installed the NVIDIA driver... seems out of the box, my resolution is horrid, though theres an added NVIDIA Server and my dual monitors aren't configured to work. I used this tutorial to get the driver installed.
View 9 Replies
View Related
Feb 3, 2010
I run a few sendmail servers that run MailScanner/Spamassassin/sendmail (current versions) on Centos 5.4 and Centos 4.8 These boxes accept mail for a large number of domains (6000+) scan the mail removing spam and then forward the ham to another server for delivery. I am attempting to stop any backscatter that these servers cause by only accepting mail for specific users@domain or for domains with a catch-all account.I currently use /etc/ mail/ access.db as the access map for the domains, but this allows all mail to be accepted for the domain before the attempting to send it on for final delivery which causes NDR and backscatter for those domains which do not have a catch-all account.
I have looked at adding "To:user@domain RELAY" to the access mapand also adding "define(`_RELAY_FULL_ADDR_', `1') " in the sendmail.mc and running make -C /etc/mail but this has no effect on the sendmail.cf file. My understanding is that if I can get sendmail to accept this undocumented feature then all will be fine as I will be able to use the access map to allow mail to those specific users as well as entries of the type "domain RELAY".My second question is: Does anyone have any ideas on how to utilise access map and relay-domains to achieve the same thing?
View 6 Replies
View Related
Jun 27, 2011
I have Debian Testing. My theme is Equinox Light and it was working well except for "Passwords and Encrypton keys" app (Version3.02). That doesn't bothered me. But after todays upgrade from gnome-terminal (2.3.2-1) to gnome-terminal3 Equinox theme doesn't work. My themes are installed in /usr/share/themes folder. It doesn't matter if i copy them to my home theme folder. It seems that gnome3 apps doesn't support
Reverting to previous version fixes the problem but i want to have version 3 with nice theme. Ho w can i achieve it?
View 2 Replies
View Related
May 11, 2011
i have problem in socket programming, while displaying received message in file,i got a problem... i cant able to write it in the file.... this is the code....
Code:
/* tcpserver.c */
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdio.h>
[Code]....
now my problem is run time error i can able to create file but i cant able to write file....log.txt contain nothing.... as here i have give sample code... dont say not initialising function and all.... i have initialised , please only see func1() - my problem is only not able to write msg which i got received from the client..
View 2 Replies
View Related
Jul 1, 2010
I installed OpenCV and am trying the example programs. When I try to compile like in the tutorial it is not finding highgui.h.I have 64 bit Mint if that helps at all
View 3 Replies
View Related