Sponsored Content
Full Discussion: intermittent bc parse error
Top Forums Shell Programming and Scripting intermittent bc parse error Post 302549349 by birei on Monday 22nd of August 2011 05:49:50 PM
Old 08-22-2011
Hi,

I don't know what fails in your script, but one solution could be doing the operation with awk.
Code:
$ sizeRAM=496454408 ; echo $sizeRAM
496454408
$ awk -v ram="$sizeRAM" 'BEGIN { printf "%.2f\n", (ram*512)/1000000 }'
254184.66

Regards,
Birei
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

FTP Problem (Intermittent)

I am having problem with ftp not indicating any error, but my customer is complaining that their response file is not present on their machine. This only happens a couple of times a day. Is there a debugging option I can turn on to the trace the ftp command. I have a return code displayed and it... (2 Replies)
Discussion started by: rob11g
2 Replies

2. UNIX for Dummies Questions & Answers

Intermittent Printer connection failure

Hi There What causes the remote printers on unix to loose its connections to the Unix server Sco 6 Version 7 When pinging the print server from unix is comes up with host not connected, but after a few moments the ping reply is positive Then we do a disable and enable of the said printer... (0 Replies)
Discussion started by: esh
0 Replies

3. Solaris

Intermittent Connection and Samba problem

Hi all , I just installed a Solaris10 on x86 machine , running on vmware . I was able to telnet from my local machine to the solaris ( the one running on the vmware) , but the connection was pretty slow and intermittent . Is there any setting that I should customize to ensure the telnet... (2 Replies)
Discussion started by: osca7578
2 Replies

4. Solaris

Intermittent internet connectivity

Hello, I am a relative UNIX newbie and we are unable to get out to the internet past the router. I can ping everything within the network but can't get out on a consistent basis. The UNIX DBA was let go recently and I have had to step in and assume his duties. Unfortunately, I am not quite... (1 Reply)
Discussion started by: judo42
1 Replies

5. HP-UX

Intermittent Network Issue

I have some issues to look at to do with reported network problems. We have had reports of intermittent connection issue between 2 servers when trying to access an Oracle Dbase. And I have been asked to check the hardware to see if it's a server issue or not. I have done some basic checks using... (3 Replies)
Discussion started by: Andyp2704
3 Replies

6. Shell Programming and Scripting

bc giving error: (standard_in) 2: parse error

Below part of script, is working fine sometimes and gives error sometime. I am doing float operations, checking if x > y. ##########CODE########## THRESHOLD="1.25" ratio=$( echo "scale=2; ${prev}/${current}" | bc ) if ; then split_date=`echo ${line} | cut -d, -f2` fi ... (9 Replies)
Discussion started by: manishma71
9 Replies

7. AIX

RSH intermittent error rshd: 0826-813 Permission is denied.

I am getting an error from one node in a set with RSH setup between them, node one will connect to node two every other time (consistently), however node to connects to node one every time without problem. Here is what I am seeing, makes no sense to me. Can anyone help? sbhcprdb01<root>: rsh... (6 Replies)
Discussion started by: JodyTek
6 Replies

8. HP-UX

[Solved] Help with intermittent ping issue

We recently stood up a new server running HP-UX 11.31. Every time we do a restart we lose connectivity to the server. Can't ping in or out. I did some troubleshooting and the problem gets resolved temporarily(can ping in and out and putty to it) when we disconnect the network cable and reconnect... (4 Replies)
Discussion started by: DtbCollumb
4 Replies

9. HP-UX

Intermittent NFS server

Hello everybody! I have a HP rx-5670 box with HP-UX 11i version 1.6 installed on it. I also have a NetApp FAS 250 working as a NFS server. I installed oracle 9i engine in my HP box while the database on the FAS 250. During these few months, my oracle server randomly got offline due to weird... (4 Replies)
Discussion started by: jembalang
4 Replies

10. Shell Programming and Scripting

Intermittent "cp: cannot stat" error with nested loop

I have a bash script that has been running (on SUSE 9.3) dozens of times over the past couple of years without error. Recently it has been hitting intermittent “cp: cannot stat FILE: No such file or directory” errors. The script has nested loops that continuously process files in a... (2 Replies)
Discussion started by: jcart
2 Replies
RAM(4)							     Kernel Interfaces Manual							    RAM(4)

NAME
ram - ram disk driver SYNOPSIS
/sys/conf/SYSTEM: NRAM ram_size # RAM disk size (512-byte blocks) major device number(s): block: 3 minor device encoding: must be zero (0) DESCRIPTION
The ram pseudo-device provides a very fast extended memory store. It's use is intended for file systems like /tmp and applications which need to access a reasonably large amount of data quickly. The amount of memory dedicated to the ram device is controlled by the NRAM definition in units of 512-byte blocks. This is also patchable in the system binary through the variable ram_size (though a patched system would have to be rebooted before any change took effect; see adb(1)). This makes it easy to test the effects of different ram disk sizes on system performance. It's important to note that any space given to the ram device is permanently allocated at system boot time. Dedicating too much memory can adversely affect system performance by forcing the system to swap heavily as in a memory poor environment. The block file accesses the ram disk via the system's buffering mechanism through a buffer sharing arrangement with the buffer cache. It may be read and written without regard to physical disk records. There is no `raw' interface since no speed advantage is gained by such an interface with the ram disk. DISK SUPPORT
The ram driver does not support pseudo-disks (partitions). The special files refer to the entire `drive' as a single sequentially addressed file. A typical use for the ram disk would be to mount /tmp on it. Note that if this arrangement is recorded in /etc/fstab then /etc/rc will have to be modified slightly to do a mkfs(8) on the ram disk before the standard file system checks are done. FILES
/dev/ram block file /dev/MAKEDEV script to create special files /dev/MAKEDEV.local script to localize special files SEE ALSO
hk(4), ra(4), rl(4), rk(4), rp(4), rx(4), si(4), xp(4) dtab(5), autoconfig(8) DIAGNOSTICS
ram: no space. There is not enough memory to allocate the space needed by the ram disk. The ram disk is disabled. Any attempts to access it will return an error. ram: not allocated. No memory was allocated to the ram disk and an attempt was made to open it. Either not enough memory was available at boot time or the kernel variable ram_size was set to zero. BUGS
The ram driver is only available under 2.11BSD. 3rd Berkeley Distribution Januray 27, 1996 RAM(4)
All times are GMT -4. The time now is 04:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy