Search Results

Search: Posts Made By: amio
Forum: Linux 09-13-2010
3,062
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...
9,929
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..
9,929
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
14,367
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
14,367
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
15,660
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...
2,997
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...
3,840
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
3,840
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
3,840
Posted By amio
Thanks friends for ur replies. amio.
Thanks friends for ur replies.

amio.
3,840
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 |...
25,622
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
6,505
Posted By amio
Any help pls?? :-(
Any help pls?? :-(
Forum: Filesystems, Disks and Memory 03-05-2009
6,505
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
8,890
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)...
12,351
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
12,351
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...
12,351
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..
12,351
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...
12,351
Posted By amio
Hi Franklin, Sorry, it ended with "Bad File...
Hi Franklin,
Sorry, it ended with "Bad File Descriptor"..
Thanks
Amio
12,351
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...
12,351
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
2,760
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"...
13,750
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...
13,750
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 05:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy