Search Results

Search: Posts Made By: amio
Forum: Linux 09-13-2010
3,637
Posted By amio
Increasing total data size per file system request for block drivers
Hi All,

I am writing a block driver for a 2GB SD card where i get the total amount of data per request as follows:


struct request *req;
uint card_addr,total_bytes;
struct request_queue...
10,767
Posted By amio
The application is written in C. As of now, am...
The application is written in C. As of now, am redirecting the output to a file and reading it from the file.

Thanks a lot for everyone's inputs..
10,767
Posted By amio
Running a script in system() call and want the script's output
Hi All,

I have a script(sample.sh) displaying the output of "dd" command. Now i am using this script in system() call as,

system("sh sample.sh") in an application file.

I want the output...
Forum: UNIX and Linux Applications 07-20-2009
15,344
Posted By amio
Hi Pludi, Thanks for ur reply. ...
Hi Pludi,

Thanks for ur reply.

sha256sum [OPTION] [FILE] takes just the message as input whereas i need to pass 2 inputs, the message and the key in keyed-hmacsha256 algorithm.

Pls help.
...
Forum: UNIX and Linux Applications 07-18-2009
15,344
Posted By amio
Cryotography -Linux API for HMAC-SHA256 algorithm
Hi all,

I need to calculate MAC value using HMAC-SHA256 algorithm with a message and a key.

Is there any Linux APIs/utilities already exist for HMAC-SHA256?

Thanks,
Amio
16,765
Posted By amio
hdparm + Inappropriate ioctl for device
Hi All,

Am finding performance of my SD card using hdparm.

Code:
hdparm -tT /dev/BlockDev0

/dev/BlockDev0:
Timing cached reads: 1118 MB in 2.00 seconds = 558.61 MB/sec...
3,306
Posted By amio
Synchronization in copying multiple files to a directory
Hi Friends,

My goal is to copy 1000 of files of same filesize simultaneously to a directory. i.e i do multiple copies into a same directory. What i feel here is, at some 1000th iteration, few...
4,177
Posted By amio
mypid=`ps -w aux | awk '/'"$myvar"'/ && !/awk/ {...
mypid=`ps -w aux | awk '/'"$myvar"'/ && !/awk/ { print $2 }'`
echo PID is $mypid

It also gives the PID using variable subtituition..
Thanks
4,177
Posted By amio
ps aux | awk '/File$i/ && !/awk/ { print $2 }' &...
ps aux | awk '/File$i/ && !/awk/ { print $2 }' & mypid=$!
echo mypid

worked for me..
Thanks
4,177
Posted By amio
Thanks friends for ur replies. amio.
Thanks friends for ur replies.

amio.
4,177
Posted By amio
Finding PID of a process using variable substituition
Hi All,
Am copying mulitple files in a directory in names File0,File1,File2 etc.
I need to print separately the PID of these copies using File names.


for((i=0;i<5;i++))
do
mypid=`ps aux |...
26,249
Posted By amio
Output of ps + awk in a variable to get PID
Hi All,

I am getting the PID of a process using its name using the following command
in a script



mypid=`ps aux | awk '/test5/ && !/awk/ { print $2 }'`
echo PID is $mypid
The problem is...
Forum: Filesystems, Disks and Memory 03-06-2009
7,812
Posted By amio
Any help pls?? :-(
Any help pls?? :-(
Forum: Filesystems, Disks and Memory 03-05-2009
7,812
Posted By amio
SD Card Throughput exceeds - On using "dd" command
Hi All,
Am using dd command to find throughput of my Normal speed SD card.
After mounting the sd card, i run,


time dd if=/dev/zero of=/mnt/sdcard/Myfile.txt bs=512
count=20480;umount...
Forum: Filesystems, Disks and Memory 03-05-2009
10,499
Posted By amio
hdparm + HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl
Hi All,
Am finding performance of my SD card using hdparm.


hdparm -tT /dev/BlockDev0

/dev/BlockDev0:
Timing cached reads: 1118 MB in 2.00 seconds = 558.61 MB/sec
HDIO_DRIVE_CMD(null)...
13,047
Posted By amio
Hi Johnson, temp=$( {...
Hi Johnson,


temp=$(
{ TIMEFORMAT=%S;time dd if=/dev/zero of=/dev/null bs=512 count=2048 2>/dev/null;sync
} 2>&1 > /dev/null )


gave me the right output.
Thanks a lot. :-)
Amio
13,047
Posted By amio
Hi Johnson, Output of seconds=$( { time...
Hi Johnson,

Output of

seconds=$( { time dd if=/dev/zero of=/dev/sda1 bs=512 count=2048;sync } 2>&1 > /dev/null )


results in
seconds: 2048+0 records in 2048+0 records out 1048576 bytes...
13,047
Posted By amio
It shows the time taken, throuput and the...
It shows the time taken, throuput and the real,user seconds for the time command in the prompt..
13,047
Posted By amio
Franklin, I tried that also.. It showed sec: dd...
Franklin,
I tried that also.. It showed sec: dd if=/dev/zero of=/dev/sda1 bs=512 count=2048;sync: No such file or directory.

Just tried by removing single quote also.. it does not print anything...
13,047
Posted By amio
Hi Franklin, Sorry, it ended with "Bad File...
Hi Franklin,
Sorry, it ended with "Bad File Descriptor"..
Thanks
Amio
13,047
Posted By amio
Hi Gee-Money, Thanks for ur reply. It did...
Hi Gee-Money,

Thanks for ur reply. It did not work.
I also tried,

sec=$({TIMEFORMAT=%S;time dd if=/dev/zero of=/dev/sda1 bs=512 count=2048;sync;} 2>&1)
echo Seconds: $sec


But the...
13,047
Posted By amio
How to store the output of "time dd if= of=" in a variable
Hi All,

I need to store the real seconds of the following command in a variable. How could it be done?



time $(dd if=/dev/zero of=/dev/sda1 bs=512 count=2048;sync)



Thanks,
Amio
3,011
Posted By amio
Filenames created with '\r' characters at the end
Hi all,
Am creating files and doing copy,compare and deletion.
As i do not want to mention the filepath everywhere, i store the filepaths in variables.

FILENAME="/home/test/create/Myfile.txt"...
14,633
Posted By amio
Hi vgersh99, Sorry, it is just what u have...
Hi vgersh99,
Sorry, it is just what u have written. I mistakenly put `.

The output of
filesize=`ls -l test.txt | awk '{print $5}'`
echo File size of test.txt is $filesize bytes >> logfile.txt...
14,633
Posted By amio
To remove the newline character while appending into a file
Hi All,

We append the output of a file's size in a file. But a newline character is appended after the variable.
Pls help how to clear this.

filesize=`ls -l test.txt | awk `{print $5}'`
echo...
Showing results 1 to 25 of 27

 
All times are GMT -4. The time now is 08:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy