Server :: Why Are 3 IOs Produced By Writing One Byte Via Write()

Jun 3, 2011

i play around with c for producing some io to a san-disk and struggle with basics here. :-(

if i'm using the write()-call to write 1 byte to a file on the disk iostat tells me i'm producing 3 writes. if i write 1 byte twice a second, it tells me i produce 6 writes (w/s).

View 8 Replies


ADVERTISEMENT

Networking :: Write Network Packets To Memory In Byte Format?

Feb 7, 2011

I'm sniffing network packets in ubuntu, I need to write these packets as raw bytes to memory but libpcap give packets in its special format. how can i save and recover packets in byte format?

View 2 Replies View Related

Programming :: Memcpy Fails To Copy Data / But Byte By Byte Assignment Work

Jul 6, 2011

I got across a peculiar problem with memcpy.History:writing a code which do flash/Read functionality for SPI Parts.

Implementation:
1.memory map the Flash chip registers to userspace. - fine
2.Issue block read command
3.Just print the data I got, using the memory mapped address - fine I got the correct data.
4.Copy the data to a local buffer from memory mapped address using memcpy - FAIL

UPDATE:
on SUSE 11.3 -32 bit the above code worked perfectly, but on SUSE 11.4 - 64bit , Ubantu, Fedora it failed.
I am using gcc compiler obviously. I am using i386/x86_64 OS. Processor: Intel core 2 duo, SNB after step 4 , when I dump the data from local buffer every thing is FF.But step 4, if i implement byte by byte copy using assignment operator, it worked.is there any known bug with memcpy? am I missing anything?

View 7 Replies View Related

Debian Hardware :: Blu-ray Writing - Wheezy Can Read But Not Write CD / DVD / BR

Feb 18, 2014

I am trying to get Debian 7.4 to burn 50Gb Blueray disks for backups using K3b. The GUI based program is important.

The reason I am using Linux Kernel 3.12-0.bpo.1-amd64 is that I am running an i7-4770K CPU and the motherboard a Supermicro c7-z87-oce (NO overclocking) and 32G RAM. I have had no other problems since using the backported kernel and turning off the onboard graphics and using an nvidia G210 graphics card.

The Pioneer BDR-209M CD/DVD/Blueray burner reads CDs and DVDs to the extent I am able to install Wheezy, and then use a backported kernel. However, it will not write CD's, DVD's and it won't recognize Blueray disks.

I have spent some time weeding through conflicting information and I wanted to verify there is not a work around. I have downloaded and installed the current version of cdrecord to no avail. I have completely removed everything CD/DVD/Blueray related and reinstalled, also to no avail.

Then I came across this statement from: [URL] ....

In all programs of the fork that send SCSI commands, you may be unable to access any of the CD/DVD/Blu-Ray drives at all if you are on Linux-2.6.8.1 or later. This is due to a missing workaround for the Linux kernel interface change that happened with Linux-2.6.8.1.

View 14 Replies View Related

General :: Make Iptables To Write Only To Log Without Writing To Console?

Aug 25, 2010

when I use LOG action in some chane of iptables rules, I get the output both in STDOUT or STDERR of the xm console and in /var/log/messages.

Is there way to make iptables to write only to log without writing to console?

View 3 Replies View Related

Networking :: Tcpdump Not Writing Raw Packets With Write Switch?

Nov 21, 2010

I am trying dump some packets using tcpdump and it does not seem to be working.

System is fedora12
TCPDUMP v4.1
Libpcap v1.0
I even rolled my own,
TCPDUMP v4.1.1
libpcap v1.1.1

View 1 Replies View Related

Programming :: Perl - Writing To File - Keep Open Or Only During Write?

May 24, 2011

i am working on this thread: [URL] if it is better to open a file every time i need to write to it or should i keep a file open the whole time and when i am done with the script, close it and sendmail it out?

Or i just thought of this: i could keep concatenating to a string and just sendmail when done.

View 2 Replies View Related

General :: Removing Write Permission Does Not Prevent Root From Writing To File

Feb 3, 2010

I just noticed on my Ubuntu machine (ext3 filesystem) that removing write permissions from a file does not keep root from writing to it. Is this a general rule of UNIX file permissions? Or specific to Ubuntu? Or a misconfiguration on my machine? Writing to the file fails (as expected) if I do this from my normal user account.Is this normal behavior?Is there a way to prevent root from accidentally writing to a file (Preferably using normal filesystem mechanisms, not AppArmor, etc.)

I understand that root has total control over the system and can, eg, change the permissions on any file.My question is whether currently set permissions are enforced on code running as root. The idea is the root user preventing her/himself from accidentally writing to a file. also understand that one should not be logged in as root for normal operations.

View 4 Replies View Related

Ubuntu :: Self-produced DVDs Not Recognized?

Feb 23, 2010

I am a fan of films that record with a DVD recorder with HD model Samsung.Wanting to pass on what I recorded on pc I had to burn movies on dvd rewritable, as the Samsung does not make me move movies on USB stick.Then I finalize the DVD with the DVD recorder that ever so I created a 4.7GB VIDEO_TS folder and G with related vob files inside.This dvd if you put them on the PC with Windows start and I can see the actual content of the file in Windows Explorer and then copy them to develop.If the computer starts with Ubuntu 9.04 I can only see them through mplayer, I have to say to open the DVD, but I can not get to see the content.Tells me that it is impossible to mount the dvd (permission problems), sees them empty to format, in short, with Ubuntu I can not have files for them to process.All this happens only with DVDs burned on my dvd recorder from the table.

View 1 Replies View Related

Ubuntu :: Can't Play Music CD's That Were Produced In Japan

Jul 7, 2010

I can't seem to play any of the music CD's, like Pink Floyd, that have been produced in Japan, not sure about CD's produced in other foreign countries.

View 6 Replies View Related

Ubuntu :: Play Foreign Produced Music CD's In 9.10 And 10.04?

Jul 8, 2010

I found out that I was trying to play foreign produced music cd's (japan) and it just won't see the cd...any way around this problem? I've tried a number of the music players but nothing.

View 8 Replies View Related

General :: Card Is Detected But No Sound Is Produced

May 16, 2010

hello experts! i have a problem with my sound card (Creative SB X-Fi Xtreme Audio), Got the driver from Creative site. The problem is that the card is detected but no sound is produced, it's not muted, i already checked. also tried the latest pulseaudio but nothing seem to work. what could be the problem?

View 2 Replies View Related

Ubuntu Servers :: Writing Specialization Work About Administration Apache And Ftp Server On 10:10 Server?

May 22, 2011

Does anyone have some material about statistics using ubuntu / linux server, or a text which generally describes the ubuntu server?I need urgent, i'm writing specialization work about administration apache and ftp server on ubuntu 10:10 server, so I need something for the conclusion.

View 7 Replies View Related

Ubuntu Networking :: NFS Mount Produced Circular Links On Urix?

Jun 20, 2011

I was setting up an Ubuntu server for a client who runs a rather old version of Irix on an SGI O2 machine (he uses some design software that does not run on newer hardware). This version of Irix can only use NFS V2 or V3, so I setup the exports file on Ubuntu to use nfs3. However, when the file system was mounted on Irix, everything (including flat text files) was mounted as a directory, i.e. everything in the Ubuntu directory was mounted as a circular link to its' self After _much_ faffing about, I found that using nfs2 in the exports file fixed the problem, and the client was a happy camper again.

View 1 Replies View Related

Programming :: Writing A TCP Server ?

May 2, 2011

I am going to write a TCP server program using c. Can anyone give me some advices on whats and what not to do specially when using select?

There would be a lot of data to be transferred both on the server and back to the client. I already have a simple server here but the server uses a lot of resources. Maybe 3 to 4 connections and the server's load would rise to unacceptable levels.

Which do you think is better to use fork or select?

View 4 Replies View Related

Server :: Syslog Stops Writing In Log / Get That To Work?

Sep 13, 2010

Syslog stops writing immediately after log rotation, after I start the system (but not after reboot), and at some other times, into my fast cgi application's log. It starts working after /etc/init.d/sysklogd restart.

Configuration:

I am using Ubuntu 8.04 lts server, Apache web server.

My (fast cgi) application uses code...

View 3 Replies View Related

Debian :: Suid And Writing Files Permissions In The ET Server?

Feb 22, 2010

I have tried to configure an Enemy Territory Server in an way that a common user could run it just executing a command line. The first thing I did was writing a script like that

/usr/local/games/enemy-territory/etded +set dedicated 1 +set net_port 27960 +set fs_game etpub +set fs_homepath /usr/local/games/enemy-territory/27960 +set sv_punkbuster 1 +set +exec server.cfg +set +exec punkbuster.cfg  +set +exec bots.cfg

and then putting it in the /usr/local/bin directory. Ok, the things seem to be fine, but then I realized that the program tries to write some config and log files. I noticed that because some warnings appear in the command line, like that Couldn't write etconfig.cfg always that I run the command as a normal user. On the other hand, if I give writing permission to these files, all the warnings disapear.
But I don't think it is a good way, because someone could change these files by hand, what would not be good.

My last try was to set the suid of the script up, with the command chmod u+s /usr/local/bin/etded-server
But as I already knew that suid does not work well with shell script I wrote a C source like that:

[Code]...

View 4 Replies View Related

Ubuntu :: Slow Network Speed When Writing To Server?

Jan 13, 2010

I have just formated and did a fresh install to start all over. I installed Ubuntu 9.1 and everything went fine but the network. The computer serve as a NAS and MediaPlayer. When getting a file from the server, I get a speed of 40-60mb/sec, which are good for a Gigabit network. When I try to put a file in, the speed can't pass more than 1mb/sec and often stop.

Here's the network info:

Code:

vric@XBMC:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:24:8c:a1:eb:55
inet addr:192.168.1.5 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::224:8cff:fea1:eb55/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

[code]...

Edit: Looks like it's a Gigabit Problem. I connected the Ubuntu box to my Linksys router which is 10/100 and everything is MUCH faster.

View 2 Replies View Related

General :: Writing Files From NFS Client To Server Behind Firewall ?

Jan 25, 2010

For some time now, I'm having some problems with configuring an NFSv4 server to let it work with a firewall. I've already searched to web, but I was unable to find a solution that works for me.

The situation is as follows:
I'm trying to connect an NFS client to an NFS server that is behind a firewall. I don't have access to this firewall, but I can contact the administrator to open some ports for me. I already did this for opening port 2049.

The result is that the client can read files from the server, but is unable to write files to the server. I believe that for writing an extra RPC-connection needs to be set up. However, the ports on which the RPC-connection is set up, seem to be different for every connection (I verified this using 'netstat -tn').

Clearly, this is a problem since the server is protected by the firewall.

Thus, what I want to do is configure the server in such a way, that it always uses the same server-side port(s) to connect with the writing clients (just like 2049 for reading). I've already tried to configure the /etc/default/nfs-kernel-server and /etc/default/nfs-common files, but that hasn't really worked out yet.

Note: Because I don't like to contact the system admin every day, I hooked up 2 computers (client/server) on which I set up the same configuration (without the firewall). I'd like to see it working on those machines first (that is, 'netstat -tn' showing the correct port), before I contact the admin to open some extra ports.

View 2 Replies View Related

Server :: Shortlist Processes Which Are Writing / Reading To / From Disks?

Apr 2, 2010

At times I see heavy hard-disk activity slowing down system.I have enough RAM and enough of it free.Apparently I am not doing anything that should cause this.'vmstat' shows high numbers for "bi bo" I want to find out which processes are doing "bi bo".How can I zero in on the particular processes?What command?

View 3 Replies View Related

Programming :: Writing A Script To Do A Speed Measurement From ISP's Test Ftp Server

Feb 5, 2010

I am writing a script to do a speed measurement from my ISP's test ftp server. To do this interactively I connect to the server, enter credentials, enable hash and download a test file. The process concludes with something like

Quote:

################################################################
226 Transfer complete.
1048576 bytes received in 2.87 secs (356.6 kB/s)

So I entered the credentials for the server in my .netrc file and created a little bash script as follows

Quote:

#!/bin/bash
cd ~/Desktop
# poiuytrewq is the limit string of the "here" document

[code]...

The script executes as expected EXCEPT that I do not see the statistics at the end of the transfer. It terminates thusly

Quote:

#################################################################################################### ############################################
ken@taylor12:~/Desktop$

I have tried adding another ftp command such as ls to the end of the "here" document (in case the results were clipped by the bye command) but to no avail. The ls result immediately follows the ### - no stats I am at a loss.

View 8 Replies View Related

Server :: Writing Debian Init Script For Process That Has No Syslog Integration?

May 18, 2011

I have inherited ownership of a Debian server process that logs its error message to stdout/stderr. Currently its initscript has lines like:

start-stop-daemon [options] --exec $DAEMON -- $DAEMON_ARGS < /dev/null 2>&1 | logger $LOG_OPTIONS 2> /dev/null &

I have tried to abstract as much of that away as possible. The options specify a pid file, to make a pid file. A subsequent line tries to establish whether the process is up, though I think several conditions are not checked for. This script seems pretty ropey to me. I am trying to start again with the lsb-base one in /etc/init.d/skeleton though that is going to require a lot of modification. get the code change to use the syslog API however that is out of the question at least for now.

1.) Create a named pipe
2.) Start up a logger daemon that reads from the named pipe
3.) start up the server process that writes to the named pipe

It would be ideal for this if start-stop-daemon offered options to specify where the IO of the daemon process should be redirected to. However I am not about to offer to adopt that package (with ~400 bugs) so I doubt that will happen. Trying to specify the redirection on the command line does not work. In the case of the logger daemon start-stop-daemon seems to hang on the system call. In the case of the server process the pipe gets closed when start-stop-daemon exits, so the logger daemon exits. None of that seems surprising.So what I am doing now is to write simple wrapper scripts for the server and logger processes. Both wrapper scripts have this structure:

1.) sanity check the arguments
2.) exec program [suitable redirection of IO]

Then the start-stop-daemon can call the wrapper scripts as daemons. From my experiments so far this seems to work. However I feel a bit uncomfortable with this. It introduces several new wrapper scripts.I cannot think of any obvious security holes but I suppose race conditions are inevitable.

View 1 Replies View Related

Fedora Servers :: Writing A Script To Search Through Specific Folders On A Based Server?

Feb 19, 2009

I am thinking about writing a script to search through specific folders on a Linux based server (Centos 5) and report any changes made to any file on that server.Like a detailed change log with the date it was changed and the difference in size. Dose anyone know if such a script exist?

View 2 Replies View Related

Ubuntu Servers :: Turn Up The Level Of Logging That DHCP Server Is Writing To SYSLOG?

Feb 14, 2011

turn up the level of logging that my DHCP Server is writing to SYSLOG?I can't seem to find a syslog.conf file to edit.

View 1 Replies View Related

CentOS 5 Server :: Writing Init Script For Wrapper - Start As Root Run By User

Nov 27, 2009

I have installed the Apache Directory Server (ApacheDS) Now I need a iniscript that startining the App as Root, so that it can use the Port 389. After them a unprivileged User (apachds) should run the Service. The same solution I am searching for Glassfish. What can I use for them? RHEL and compatibles doesn't have a start-stop-daemon like Debian.

View 3 Replies View Related

Programming :: Convert Gigabyte To Byte?

Nov 24, 2010

I'm learning C and trying to write a program to convert gigabyte into byte. It will take 50% of the value given and then convert that value into byte. But the problem is the output goes into minus / negative value. Like, if I enter 22, I get output: -2147483648.

Code:

#include <stdio.h>
#include <math.h>
main (int argc, char* argv[])
{

[Code]....

View 5 Replies View Related

Programming :: Byte At Memory Location 45 With Immediate Value 03

Jul 10, 2011

As 2.17
I want to code this:
and byte[45],03

In words, AND the byte at memory location 45 with immediate value 03. As reports "Ambiguous operand size for and". How could I code the instruction such that as understands my intention?

john: .byte 45
and byte[john],03
gives the same error.

View 8 Replies View Related

Software :: How Many 4096 Byte Blocks On Disk

Aug 13, 2011

I want to find out how many 4096 byte blocks there are on my disk. I used df -B 4096 and it gave me a number but I'm not sure it's correct as I can use dd to read past what should be the final block.

So I do df -B 4096 and it reports this result:

Code:
Filesystem 4K-blocks Used Available Use% Mounted on
/dev/sda1 15618840 13190294 1635137 89% /

But when I use dd to go past that block, it doesn't report an error or anything. The command I'm using is

Code:
dd if=/dev/sda1 bs=4096 count=1 skip=15618841

How can I know that I'm really reading the very last block on the drive?

View 2 Replies View Related

Programming :: Calculate The Number Of - Necessary - Bits In A Byte ?

Jun 11, 2010

E.g. 98 is represented as 1100010 (number of valid bits is 7)

What is the formula to calculate the number of valid bits in a byte ?

View 14 Replies View Related

Slackware :: Searching A Byte Sequence Within A File?

Dec 11, 2010

Code:dd if=/dev/sda bs=1 count=2048 of=johnIs there a linux tool to search for a sequence of bytes within john? E.g., to look for 0x6a84b5fe78 ?

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved