How to get the loop sequence time (i) out of the while loop in the sub-vi to the main vi?

I tried to search for the answer but no much luck.  My situation is that I used a sub-vi containing a while loop in my main vi. Now I need to see the while loop sequence number (i) from that sub-vi in my main vi.  In the sub-vi I have the indicator to show this loop sequence flawlessly, but that's inside the loop itself.  If I use this indicator as a terminal in the sub-vi, I can only see the last sequence number in the main vi after the loop finished its execution.
Is there a way to accomplish this? Thanks.

Hi nobody,
well easiest (but error prone) way is to use globals to move data from subvi to main vi. You can also give the reference of the main vi indicator to the subvi to write to a "value" property node. You can also use queues, and there are other techniques too
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome

Similar Messages

  • How to get system date and time?

    Can someone show me a code on how to get system date and time.
    Thanks!

    there is one really easy way to get system time, the api gives a great example of code on this. use gregorian calendar, which you'll find in the api under GregorianCalendar. You only need to create one instance of GC, ie Calendar time = new GregorianCalendar();
    you save seconds, minute and hours into int values, so you don't have to access the system time every second, you can create a thread which adds one to the int second value, if oyu see what i mean, for example, i have saved the hours, minutes and seconds as int values;
    int hour, minute, second;
    i can then create a thread (Thread thread = new Thread(this) and run it like:
    Calendar time;
    int hour, minute, second;
    Thread thread = null;
    public MyTime() {
    hour= time.get(Calendar.HOUR_OF_DAY);
    minute = time.get(Calendar.MINUTE);
    second = time.get(Calendar.SECOND);
    if(thread == null) {
    thread = new Thread(this);
    thread.start();
    public void run() {
    Thread t = Thread.currentThread();
    while(thread == t) {
    thread.sleep(1000);
    second++;
    if(second > 59)
    minute++;
    if(minute>59)
    hour++;
    formatTime();
    public void formatTime() {
    second = (second > 59? 0 : second);
    minute = (minute > 59? 0 : minute);
    hour = (hour > 23? 0 : hour);
    System.out.println(hour+":"+minute+":"+second);
    public static void main(String[] args) {
    new MyTime();
    I know this looks like gibberish but it should work. If not, try to fix the problem, i have written from memory really but i guarantee you, this gets the time then every second, simply adds one to the second and then formats time. You can also access the day, month and year then format them using the above code. I don't like giving code since you should really do these things yourself but it is 2:04am, i have nothing better to do and i am not tired so i did you a favour - i have become what i always did not want to, someone ho stays upall night writing code.

  • Need to know how to get my apple account to sync up with a new email on my phone and delete the old one in a step by step process??

    Need to know how to get my apple account to sync up with a new email on my phone and delete the old one in a step by step process??

    After you change the account settings as I described below hold your finger on any app until they all wriggle, then tap the "-" on each purchased with her Apple ID. Press the HOME button when done. Then go to the App Store and buy or download the apps you want.

  • How to get access to my iCloud back up when setting up a new iPhone 5s which needs the newest version of iOS7 first?

    how to get access to my iCloud back up when setting up a new iPhone 5s which needs the newest version of iOS7 first?

    Set up the new phone as a new iPhone (without using your backup), then update it to the latest iOS (7.1.2).  Then go to Settings>General>Reset, tap Erase All Content and Settings, go through the setup screens again and when given the option, choose Restore from iCloud Backup and follow the prompts.  This process is explained in more detail here: iCloud: Restore your iOS device from iCloud.

  • How can I move (copy) my Time Capsule date to a new 2T hard drive and then wipe the TC and start as a new (clean) Time MACHINE backup?

    How can I move (copy) my Time Capsule date to a new 2T hard drive and then wipe the TC and start as a new (clean) Time MACHINE backup?

    Just use the archive utility on the disk page of the airport utility manual setup..
    If you have lion and v6 airport utility.. it missed out. On lots of things.
    Download and install the real.. UTILITY
    5.6 http://support.apple.com/kb/DL1482

  • HT201441 I don't have owner's phone number, how to get  previous owner's Apple ID(email address) and send him a email let him remove the device from the account.

    I don't have owner's phone number, how to get  previous owner's Apple ID(email address) and send him a email let him remove the device from the account

    There is no way for anyone on this forum to assist you.  Apple will also not assist you.  If you purchased the device thru ebay, file a claim.  If you purchased it some other way, I'm sorry.  there is nothing anyone can do to help you.

  • How to out from infinite while loop in sub VI

    Dear Sir,
    how to out from infinite while loop in sub VI from main VI
    attached photo for solution but I can't understand it and i can't find the function in photo 
    please help
    Attachments:
    stop_subVI_frm_main.JPG ‏36 KB

    Asking how to get out of an infinite loop is like asking how to find the end of a circle. I'm not trying to be sarcastic but by definition, if there is a way out of the loop, then it is not infinite. I think what you are asking is how to avoid creating an infinite loop. Is there something about the suggestions you have been given that you do not like? My favorite suggestion is the notifier but maybe you just need an example. Turn on context help and read about the notifier functions in the code below.
    This is your top level VI
    And this is your subVI
    If this seems too complex then a global variable will work too. But what seems simpler can cause much more complex bugs. You can code fast and spend lots of time debugging or you can code slow and spend less time debugging. Personally I perfer writing productive code than looking for bugs any time.
    =====================
    LabVIEW 2012

  • How can I vary a PWM´s duty cycle inside a while loop?

    Hi,
    I'm using the "Generate Pulse Train.vi" to generate pwm signals in counters 0 and 1 in order to drive a DC motor both ways.
    The problem is, I need to control the movement of the dc motor with my PI controller which is inside a while loop. I've tried letting the "generate pulse train.vi" outside the while loop, but the problem is, it only changes the value of the duty cycle when the loop is stopped. I also tried putting it inside the loop, but then it doesn't even work.
    So, how can I vary a PWM´s duty cycle inside a while loop?
    I'm attaching the VI with the PI controller.
    Thanks for your help!
    Guilherme
    Attachments:
    controleValvula.vi ‏332 KB

    Here's some code I threw together a while back to change a duty cycle on the fly. It generates a fixed 5KHz or 25KHz frequency depending on laser selection, then allows duty cycle to be changed continously. Maybe you can use the premise of it for your application.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    "It’s the questions that drive us.”
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    Attachments:
    Pulse_Width_Modulator.llb ‏197 KB

  • And disconected the plug many times, but nothing has worked. I'm in Brazil and bought the phone

    My iPhone 4 is interpreting that the headset is conected even if it isnt. I've already reset it, conected and disconected the plug many times, but nothing has worked. I'm in Brazil and bought the phone in Canada. Does it have a garantee? Is there anything I'm missing in adjusting my iPhone?

    It may not be your computer telling you this, it is probably the company providing the shows to you over the Internet. If that is the case, no setting on your computer can change it because the media company is going by your network address (IP address), which is where your Internet modem (cable or DSL) connects to the outside Internet. If the location of your Internet connection appears to be outside the US (even if it is mistake), media companies that distribute shows under contracts with geographical restrictions may lock you out.
    If you use a service like a VPN service, you may have the ability to use IP addresses from other countries so that you can appear to be connecting from there. But it takes some setting up.

  • My daughtrts ipad 2 only recognises headphones. and the internal speaker will not work. we have reset the system  three times, cleaned out the headphone jack, and  chrckrd the side switch above the volume. alos we ensured it was not in do not disturb mode

    On our ipad the speaker has quit working. Sound is only heard when you have head phones plugged in. We have reset the system three times cleaned out the headphone jack. Changed languages and rest but nothing works. This ipad is important to our daughter it is her tool to communicate with us and now it is not working please help

    You've done well with troubleshooting so far. Next step would be to back up and then restore from iTunes. Good luck!

  • When ever I put in my earphones completely in the slot no sound comes out but when I put then in 3/4 of the wAy in they work fine

    When ever I put in my earphones completely in the slot no sound comes out but when I put then in 3/4 of the wAy in they work fine

    Have you tried another pair of headphones to rule out a problem with the headphones?
    - Try cleaning out/blowing out the headphone jack. Try inserting/removing the plug a dozen times or so. There is a little switch in the headphone jack that disconnects the speaker when the headphone jack is inserted.
    Try the following to rule out a software problem
    - Reset the iOS device. Nothing will be lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Reset all settings
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup
    - Restore to factory settings/new iOS device.
    - Make an appointment at the Genius Bar of an Apple store. Seems you have a bad headphone jack.
    Apple Retail Store - Genius Bar
    If not under warranty Apple will exchange your iPod for a refurbished one for this price. They do not fix yours.
    Apple - iPod Repair price                  
    A third-party place like the following will replace the jack for less. Google for more.
    iPhone Repair, Service & Parts: iPod Touch, iPad, MacBook Pro Screens
    Replace the jack yourself
    iPod Touch Repair – iFixit

  • I have Mac mini and there is partition of boot camp but some miss understanding the osx 10.8.2 is deleted and while I m going to recovery mode the portition can not removing and the also cant repaired what I do I need urgent help ???? Please ?????

    I have Mac mini and there is partition of boot camp but some miss understanding the osx 10.8.2 is deleted and while I m going to recovery mode the portition can not removing and the also cant repaired what I do I need urgent help ???? Please ?????

    Do you have a Time Machine backup or clone?  If not,
    all is lost if you have in fact deleted your OSX partition
    and you will have to do a reinstall from Recovery HD
    and install all else.

  • How to get a lower boot time in eee?

    I've managed to lower my boot time to 14 seconds on the asus eee, but I know it can get lower that that... Apart from recompiling the kernel (which I intend to do last), can you suggest anything else might help?
    Bootchart
    My rc.conf
    # /etc/rc.conf - Main Configuration for Arch Linux
    # LOCALIZATION
    # LOCALE: available languages can be listed with the 'locale -a' command
    # HARDWARECLOCK: set to "UTC" or "localtime"
    # USEDIRECTISA: use direct I/O requests instead of /dev/rtc for hwclock
    # TIMEZONE: timezones are found in /usr/share/zoneinfo
    # KEYMAP: keymaps are found in /usr/share/kbd/keymaps
    # CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
    # CONSOLEMAP: found in /usr/share/kbd/consoletrans
    # USECOLOR: use ANSI color sequences in startup messages
    LOCALE="en_US.utf8"
    HARDWARECLOCK="UTC"
    USEDIRECTISA="no"
    TIMEZONE="Europe/Athens"
    KEYMAP="us"
    CONSOLEFONT=
    CONSOLEMAP=
    USECOLOR="yes"
    # HARDWARE
    # MOD_AUTOLOAD: Allow autoloading of modules at boot and when needed
    # MOD_BLACKLIST: Prevent udev from loading these modules
    # MODULES: Modules to load at boot-up. Prefix with a ! to blacklist.
    # NOTE: Use of 'MOD_BLACKLIST' is deprecated. Please use ! in the MODULES array.
    MOD_AUTOLOAD="yes"
    #MOD_BLACKLIST=() #deprecated
    MODULES=()
    # Scan for LVM volume groups at startup, required if you use LVM
    USELVM="no"
    # NETWORKING
    # HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
    HOSTNAME="asuseee"
    # Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
    # Interfaces to start at boot-up (in this order)
    # Declare each interface then list in INTERFACES
    # - prefix an entry in INTERFACES with a ! to disable it
    # - no hyphens in your interface names - Bash doesn't like it
    # DHCP: Set your interface to "dhcp" (eth0="dhcp")
    # Wireless: See network profiles below
    eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
    INTERFACES=(eth0)
    # Routes to start at boot-up (in this order)
    # Declare each route then list in ROUTES
    # - prefix an entry in ROUTES with a ! to disable it
    gateway="default gw 192.168.0.1"
    ROUTES=(!gateway)
    # Enable these network profiles at boot-up. These are only useful
    # if you happen to need multiple network configurations (ie, laptop users)
    # - set to 'menu' to present a menu during boot-up (dialog package required)
    # - prefix an entry with a ! to disable it
    # Network profiles are found in /etc/network.d
    # This now requires the netcfg package
    #NETWORKS=(main)
    # DAEMONS
    # Daemons to start at boot-up (in this order)
    # - prefix a daemon with a ! to disable it
    # - prefix a daemon with a @ to start it up in the background
    DAEMONS=(syslog-ng @crond @hal gdm)
    My rc.sysinit
    #!/bin/bash
    # /etc/rc.sysinit
    . /etc/rc.conf
    . /etc/rc.d/functions
    echo " "
    printhl "Arch Linux\n"
    printhl "${C_H2}http://www.archlinux.org"
    printhl "Copyright 2002-2007 Judd Vinet"
    printhl "Copyright 2007-2009 Aaron Griffin"
    printhl "Distributed under the GNU General Public License (GPL)"
    printsep
    # mount /proc, /sys and our RAM /dev
    /bin/mount -n -t ramfs none /dev
    /bin/mount -n -t proc none /proc
    /bin/mount -n -t sysfs none /sys
    # Create our default nodes that minilogd may need
    /bin/mknod /dev/null c 1 3
    /bin/mknod /dev/zero c 1 5
    /bin/mknod /dev/console c 5 1
    # More initial /dev setup that udev doesn't do
    /bin/ln -snf /proc/self/fd /dev/fd
    /bin/ln -snf /proc/self/fd/0 /dev/stdin
    /bin/ln -snf /proc/self/fd/1 /dev/stdout
    /bin/ln -snf /proc/self/fd/2 /dev/stderr
    /bin/ln -snf /proc/kcore /dev/core
    /bin/mkdir /dev/pts
    /bin/mkdir /dev/shm
    # start up our mini logger until syslog takes over
    /sbin/minilogd
    # anything more serious than KERN_WARNING goes to the console
    # 'verbose' cmdline parameter enables more messages
    if /bin/grep -q " verbose" /proc/cmdline; then
    /bin/dmesg -n 8
    else
    /bin/dmesg -n 3
    fi
    # enable rtc access
    /sbin/modprobe rtc-cmos >/dev/null 2>&1
    RTC_MAJOR=$(/bin/grep -w rtc /proc/devices 2>/dev/null); RTC_MAJOR="${RTC_MAJOR%% *}"
    if [ -n "$RTC_MAJOR" ]; then
    /bin/mkdir /dev/misc/
    /bin/mknod /dev/misc/rtc0 c $RTC_MAJOR 0
    /bin/ln -s /dev/misc/rtc0 /dev/rtc
    fi
    HWCLOCK_PARAMS="--hctosys"
    if [ "$HARDWARECLOCK" = "UTC" ]; then
    HWCLOCK_PARAMS="$HWCLOCK_PARAMS --utc"
    else
    HWCLOCK_PARAMS="$HWCLOCK_PARAMS --localtime"
    fi
    if [ "$USEDIRECTISA" = "yes" -o "$USEDIRECTISA" = "YES" ]; then
    HWCLOCK_PARAMS="$HWCLOCK_PARAMS --directisa"
    fi
    # Set clock early to fix some bugs with filesystem checks
    # Clock is set again later to match rc.conf
    if [ -f /etc/localtime ]; then
    /sbin/hwclock $HWCLOCK_PARAMS --noadjfile
    fi
    echo > /proc/sys/kernel/hotplug
    if [ -x /sbin/udevadm -a -d /sys/block ]; then
    # We have udev and /sys appears to be mounted, use UDev
    stat_busy "Starting UDev Daemon"
    /sbin/udevd --daemon
    /sbin/udevadm trigger
    stat_done
    else
    # Static /dev, our last resort
    status "Using static /dev filesystem" true
    fi
    # Load modules from the MODULES array defined in rc.conf
    if ! [ "$load_modules" = "off" ]; then
    if [ -f /proc/modules ]; then
    stat_busy "Loading Modules"
    for mod in "${MODULES[@]}"; do
    if [ "$mod" = "${mod#!}" ]; then
    /sbin/modprobe $mod
    fi
    done
    stat_done
    fi
    if [ -d /proc/acpi ]; then
    stat_busy "Loading standard ACPI modules"
    ACPI_MODULES="ac battery button fan processor thermal"
    k="$(echo $BLACKLIST ${MOD_BLACKLIST[@]} | /bin/sed 's|-|_|g')"
    j="$(echo ${MODULES[@]} | /bin/sed 's|-|_|g')"
    #add disabled MODULES (!) to blacklist - much requested feature
    for m in ${j}; do
    [ "$m" != "${m#!}" ] && k="${k} ${m#!}"
    done
    # add disablemodules= from commandline to blacklist
    k="${k} $(echo ${disablemodules} | /bin/sed 's|-|_|g' | /bin/sed 's|,| |g')"
    for n in ${ACPI_MODULES}; do
    if ! echo ${k} | /bin/grep "\<$n\>" 2>&1 >/dev/null; then
    /sbin/modprobe $n > /dev/null 2>&1
    fi
    done
    stat_done
    fi
    fi
    # run udev uevents
    if /bin/pidof -o %PPID /sbin/udevd >/dev/null; then
    stat_busy "Loading UDev uevents"
    udevstart="$(/bin/date +%s%0N)"
    # /sbin/udevadm trigger
    /sbin/udevadm settle
    stat_done
    udevend="$(/bin/date +%s%0N)"
    printhl " UDev uevent processing time: $((($udevend-$udevstart)/1000000))ms"
    fi
    # bring up the loopback interface
    if [ -d /sys/class/net/lo ]; then
    stat_busy "Bringing up loopback interface"
    /sbin/ifconfig lo 127.0.0.1 up
    if [ $? -ne 0 ]; then
    stat_fail
    else
    stat_done
    fi
    fi
    # If necessary, find md devices and manually assemble RAID arrays
    #if [ -f /etc/mdadm.conf -a "$(/bin/grep ^ARRAY /etc/mdadm.conf 2>/dev/null)" ]; then
    # # udev won't create these md nodes, so we do it ourselves
    # for dev in $(/bin/grep ^ARRAY /etc/mdadm.conf | /bin/awk '{print $2}'); do
    # path=$(echo $dev | /bin/sed 's|/[^/]*$||')
    # node=$(echo $dev | /bin/sed "s|^$path/||")
    # minor=$(echo $node | /bin/sed 's|^[^0-9]*||')
    # [ ! -e $path/$node ] && /bin/mknod $path/$node b 9 $minor
    # done
    # status "Activating RAID arrays" /sbin/mdadm --assemble --scan
    #fi
    if [ "$USELVM" = "yes" -o "$USELVM" = "YES" ]; then
    if [ -x /sbin/lvm -a -d /sys/block ]; then
    # Kernel 2.6.x, LVM2 groups
    /sbin/modprobe -q dm-mod 2>/dev/null
    stat_busy "Activating LVM2 groups"
    /sbin/lvm vgscan --ignorelockingfailure --mknodes >/dev/null
    /sbin/lvm vgchange --ignorelockingfailure -a y >/dev/null
    if [ $? -ne 0 ]; then
    stat_fail
    else
    stat_done
    fi
    fi
    fi
    # Set up non-root encrypted partition mappings
    #if [ -f /etc/crypttab -a -n "$(/bin/grep -v ^# /etc/crypttab | /bin/grep -v ^$)" ]; then
    # /sbin/modprobe -q dm-mod 2>/dev/null
    # stat_busy "Unlocking encrypted volumes:"
    # csfailed=0
    # CS=/sbin/cryptsetup.static
    # do_crypt() {
    # if [ $# -ge 3 ]; then
    # cname="$1"
    # csrc="$2"
    # cpass="$3"
    # shift 3
    # copts="$*"
    # stat_append "${cname}.."
    # # For some fun reason, the parameter ordering varies for
    # # LUKS and non-LUKS devices. Joy.
    # if [ "${cpass}" = "SWAP" ]; then
    # # This is DANGEROUS! The only possible safety check
    # # is to not proceed in case we find a LUKS device
    # # This may cause dataloss if it is not used carefully
    # if $CS isLuks $csrc 2>/dev/null; then
    # false
    # else
    # $CS -d /dev/urandom $copts create $cname $csrc >/dev/null
    # if [ $? -eq 0 ]; then
    # stat_append "creating swapspace.."
    # /sbin/mkswap -L $cname /dev/mapper/$cname >/dev/null
    # fi
    # fi
    # elif [ "${cpass}" = "ASK" ]; then
    # printf "\nOpening '${cname}' volume:\n"
    # if $CS isLuks $csrc 2>/dev/null; then
    # $CS $copts luksOpen $csrc $cname < /dev/console
    # else
    # $CS $copts create $cname $csrc < /dev/console
    # fi
    # elif [ "${cpass:0:1}" != "/" ]; then
    # if $CS isLuks $csrc 2>/dev/null; then
    # echo "$cpass" | $CS $copts luksOpen $csrc $cname >/dev/null
    # else
    # echo "$cpass" | $CS $copts create $cname $csrc >/dev/null
    # fi
    # else
    # if $CS isLuks $csrc 2>/dev/null; then
    # $CS -d $cpass $copts luksOpen $csrc $cname >/dev/null
    # else
    # $CS -d $cpass $copts create $cname $csrc >/dev/null
    # fi
    # fi
    # if [ $? -ne 0 ]; then
    # csfailed=1
    # stat_append "failed "
    # else
    # stat_append "ok "
    # fi
    # fi
    # while read line; do
    # eval do_crypt "$line"
    # done </etc/crypttab
    # if [ $csfailed -eq 0 ]; then
    # stat_done
    # else
    # stat_fail
    # fi
    # # Maybe someone has LVM on an encrypted block device
    # if [ "$USELVM" = "yes" -o "$USELVM" = "YES" ]; then
    # if [ -x /sbin/lvm -a -d /sys/block ]; then
    # /sbin/lvm vgscan --ignorelockingfailure --mknodes >/dev/null
    # /sbin/lvm vgchange --ignorelockingfailure -a y >/dev/null
    # fi
    # fi
    #fi
    status "Mounting Root Read-only" /bin/mount -n -o remount,ro /
    FORCEFSCK=
    [ -f /forcefsck ] && FORCEFSCK="-- -f"
    NETFS="nonfs,nonfs4,nosmbfs,nocifs,nocodafs,noncpfs,nosysfs,noshfs,nofuse,nofuseblk"
    if [ -x /sbin/fsck ]; then
    stat_busy "Checking Filesystems"
    if /bin/grep -qw quiet /proc/cmdline; then
    /sbin/fsck -A -T -C -a -t $NETFS $FORCEFSCK >/dev/null 2>&1
    else
    /sbin/fsck -A -T -C -a -t $NETFS $FORCEFSCK 2>/dev/null
    fi
    fsckret=$?
    if [ ${fsckret} -gt 1 ]; then
    stat_fail
    if [ $((${fsckret}&2)) -eq 2 ]; then
    echo
    echo "********************** REBOOT REQUIRED *********************"
    echo "* *"
    echo "* The system will be rebooted automatically in 15 seconds. *"
    echo "* *"
    echo "************************************************************"
    echo
    /bin/sleep 15
    else
    echo
    echo "***************** FILESYSTEM CHECK FAILED ****************"
    echo "* *"
    echo "* Please repair manually and reboot. Note that the root *"
    echo "* file system is currently mounted read-only. To remount *"
    echo "* it read-write type: mount -n -o remount,rw / *"
    echo "* When you exit the maintenance shell the system will *"
    echo "* reboot automatically. *"
    echo "* *"
    echo "************************************************************"
    echo
    /sbin/sulogin -p
    fi
    echo "Automatic reboot in progress..."
    /bin/umount -a
    /bin/mount -n -o remount,ro /
    /sbin/reboot -f
    exit 0
    fi
    stat_done
    fi
    stat_busy "Mounting Local Filesystems"
    /bin/mount -n -o remount,rw /
    /bin/rm -f /etc/mtab*
    # make sure / gets written to /etc/mtab
    /bin/mount -o remount,rw /
    # Write /proc, /sys and /dev to /etc/mtab
    if [ -e /proc/mounts ]; then
    /bin/grep -e "/proc " -e "/sys " -e "/dev " /proc/mounts >> /etc/mtab
    fi
    # now mount all the local filesystems
    /bin/mount -a -t $NETFS
    stat_done
    #status "Activating Swap" /sbin/swapon -a
    stat_busy "Configuring System Clock"
    if [ ! -f /var/lib/hwclock/adjtime ]; then
    echo "0.0 0 0.0" > /var/lib/hwclock/adjtime
    fi
    if [ "$TIMEZONE" != "" -a -e "/usr/share/zoneinfo/$TIMEZONE" ]; then
    /bin/rm -f /etc/localtime
    /bin/cp "/usr/share/zoneinfo/$TIMEZONE" /etc/localtime
    fi
    /sbin/hwclock $HWCLOCK_PARAMS
    stat_done
    if [ -f /var/run/random-seed ]; then
    stat_busy "Initializing Random Seed"
    /bin/cat /var/run/random-seed >/dev/urandom
    stat_done
    fi
    stat_busy "Removing Leftover Files"
    /bin/rm -f /etc/nologin &>/dev/null
    /bin/rm -f /etc/shutdownpid &>/dev/null
    /bin/rm -f /var/lock/* &>/dev/null
    /bin/rm -rf /tmp/* /tmp/.* &>/dev/null
    /bin/rm -f /forcefsck &>/dev/null
    (cd /var/run && /usr/bin/find . ! -type d -exec /bin/rm -f -- {} \; )
    : > /var/run/utmp
    /bin/chmod 0664 /var/run/utmp
    # Keep {x,k,g}dm happy with xorg
    /bin/mkdir /tmp/.ICE-unix && /bin/chmod 1777 /tmp/.ICE-unix
    /bin/mkdir /tmp/.X11-unix && /bin/chmod 1777 /tmp/.X11-unix
    stat_done
    #status "Updating Shared Library Links" /sbin/ldconfig
    if [ "$HOSTNAME" != "" ]; then
    status "Setting Hostname: $HOSTNAME" /bin/hostname $HOSTNAME
    fi
    # Set the NIS domain name, if necessary
    [ -f /etc/conf.d/nisdomainname ] && . /etc/conf.d/nisdomainname
    if [ "$NISDOMAINNAME" != "" ]; then
    status "Setting NIS Domain Name: $NISDOMAINNAME" /bin/nisdomainname $NISDOMAINNAME
    fi
    status "Updating Module Dependencies" /sbin/depmod -A
    # Flush old locale settings
    : >/etc/profile.d/locale.sh
    /bin/chmod 755 /etc/profile.d/locale.sh
    # Set user defined locale
    [ -z "$LOCALE" ] && LOCALE="en_US"
    stat_busy "Setting Locale: $LOCALE"
    echo "export LANG=$LOCALE" >>/etc/profile.d/locale.sh
    stat_done
    if echo "$LOCALE" | /bin/grep -qi utf ; then
    stat_busy "Setting Consoles to UTF-8 mode"
    # UTF-8 consoles are default since 2.6.24 kernel
    # this code is needed not only for older kernels,
    # but also when user has set vt.default_utf8=0 but LOCALE is *.UTF-8.
    for i in $(/usr/bin/seq 0 63); do
    /usr/bin/kbd_mode -u < /dev/vc/${i}
    printf "\e%%G" > /dev/vc/${i}
    done
    # the $CONSOLE check helps us avoid this when running scripts from cron
    echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then printf "\e%%G"; fi' >>/etc/profile.d/locale.sh
    stat_done
    [ -n "$KEYMAP" ] && status "Loading Keyboard Map: $KEYMAP" /bin/loadkeys -q -u $KEYMAP
    else
    stat_busy "Setting Consoles to legacy mode"
    # make non-UTF-8 consoles work on 2.6.24 and newer kernels
    for i in $(/usr/bin/seq 0 63); do
    /usr/bin/kbd_mode -a < /dev/vc/${i}
    printf "\e%%@" > /dev/vc/${i}
    done
    # the $CONSOLE check helps us avoid this when running scripts from cron
    echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then printf "\e%%@"; fi' >>/etc/profile.d/locale.sh
    stat_done
    [ -n "$KEYMAP" ] && status "Loading Keyboard Map: $KEYMAP" /bin/loadkeys -q $KEYMAP
    fi
    if [ -n "$CONSOLEFONT" ]; then
    stat_busy "Loading Console Font: $CONSOLEFONT"
    #CONSOLEMAP in UTF-8 shouldn't be used
    if [ -n "$CONSOLEMAP" ] && echo "$LOCALE" | /bin/grep -qi utf ; then
    CONSOLEMAP=""
    fi
    for i in $(/usr/bin/seq 0 63); do
    if [ -n "$CONSOLEMAP" ]; then
    /usr/bin/setfont -m $CONSOLEMAP $CONSOLEFONT -C /dev/vc/${i} >/dev/null 2>&1
    else
    /usr/bin/setfont $CONSOLEFONT -C /dev/vc/${i} >/dev/null 2>&1
    fi
    done
    if [ $? -ne 0 ]; then
    stat_fail
    else
    for i in $(/usr/bin/seq 0 63); do
    printf "\e(K" > /dev/vc/${i}
    done
    # the $CONSOLE check helps us avoid this when running scripts from cron
    echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then printf "\e(K"; fi' >>/etc/profile.d/locale.sh
    stat_done
    fi
    fi
    # Adding persistent network/cdrom generated rules
    #if [ -f "/dev/.udev/tmp-rules--70-persistent-cd.rules" ]; then
    # stat_busy "Adding persistent cdrom udev rules"
    # /bin/cat /dev/.udev/tmp-rules--70-persistent-cd.rules >> /etc/udev/rules.d/70-persistent-cd.rules
    # stat_done
    #fi
    if [ -f "/dev/.udev/tmp-rules--70-persistent-net.rules" ]; then
    stat_busy "Adding persistent network udev rules"
    /bin/cat /dev/.udev/tmp-rules--70-persistent-net.rules >> /etc/udev/rules.d/70-persistent-net.rules
    stat_done
    fi
    # Save our dmesg output from this boot
    if [ -f /var/log/dmesg.log ]; then
    /bin/rm /var/log/dmesg.log
    fi
    /bin/dmesg > /var/log/dmesg.log
    # End of file
    # vim: set ts=2 noet:

    DreamAxe wrote:
    quarkup wrote:Once the modules are all loaded,  by enabling this option I "consume" only  ~70ms
    I see that you mention milliseconds again, how exactly do you count these milliseconds? Since my last message, I've tried other I/O schedulers and three out of four get the same result. I believe that there IS a difference among schedulers but since bootchart displays the results in seconds, I can't compare them. If you could just tell me how you count in ms I could compare them and see which one is faster at booting the eee. In case you're wondering, noop is the slowest, requiring 16sec to boot the eee while cfq, anticipatory and deadline require 14sec according to bootchart.
    I'm talking about "loading" modules, not the full-boot time..
    After turning on the PC, there will be shown on the virtual terminal the time taken by Udev to load all modules.
    as you can see
    Last edited by quarkup (2009-02-20 13:49:55)

  • How to get maxvalue of sequence in table

    hi,
    i have made a sequence to be used for an ID column of a table as a primary key. now this sequence is incremented by one,, suppose the maxvalue in this column is 5,,and i want to store next row with ID = 6,,and the statement rollbacks or failed due to any other reason,,the value of 6 has gone,,and nextval would be 7,,how can i get my ID column as an autoincrement such as Autonumber in MS SQL Server ,,is there any other technique available in Oracle??
    onetechnique is this tht we get maxvalue of the column thru query and then ourself increment in it,,but this is not a sophisticated way,,
    any suggestion would be highly appreciated.
    Regards
    Muhammad Umar Liaquat.

    By definition, you cannot guarantee that values in a sequence generated column are gap-free. There are a number of different things that can cause gaps, including rollbacks.
    Is there a legitimate business reason that you want a gap-free sequence of values? 99% of the time, this sort of request has no real justification. If there is a justification, the underlying problem can be solved by adding rownum or dense_rank() to a view on the data for the business users to query.
    If you do need gap-free sequences, you have to serlialize transactions-- only one transaction at a time can get an ID. This is obviously a scalability killer.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • How to get min,max,avg time for query execution?

    Dear Friends,
    In AWR we are getting avg time taken to execute particular query, how can one get min,max time taken by query during number of executions.
    Thanks

    I would run the sql in a cursor for loop, to get a quite reasonable execution time without changing the actual execution plan:
    SQL> show user;
    USER is "HR"
    SQL> set timing on
    SQL> select count(*) from all_objects;
      COUNT(*)
         55565
    Elapsed: 00:00:03.91
    SQL> var p_sql varchar2(200)
    SQL> exec :p_sql := 'select * from all_objects'
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    SQL> declare
      2  t1 timestamp := systimestamp;
      3  begin
      4    execute immediate 'begin for c in (' || :p_sql || ') loop null; end loop; end;';
      5    dbms_output.put_line('Elapsed: ' || (systimestamp - t1));
      6  end;
      7  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:03.53
    SQL> declare
      2  t1 timestamp := systimestamp;
      3  begin
      4    execute immediate 'begin for c in (' || :p_sql || ') loop null; end loop; end;';
      5    dbms_output.put_line('Elapsed: ' || (systimestamp - t1));
      6  end;
      7  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:02.75
    SQL> declare
      2  t1 timestamp := systimestamp;
      3  begin
      4    execute immediate 'begin for c in (' || :p_sql || ') loop null; end loop; end;';
      5    dbms_output.put_line('Elapsed: ' || (systimestamp - t1));
      6  end;
      7  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:02.73
    SQL> declare
      2  t1 timestamp := systimestamp;
      3  begin
      4    execute immediate 'begin for c in (' || :p_sql || ') loop null; end loop; end;';
      5    dbms_output.put_line('Elapsed: ' || (systimestamp - t1));
      6  end;
      7  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:02.66
    SQL> ---- alter system flush shared_pool;
    SQL> declare
      2  t1 timestamp := systimestamp;
      3  begin
      4    execute immediate 'begin for c in (' || :p_sql || ') loop null; end loop; end;';
      5    dbms_output.put_line('Elapsed: ' || (systimestamp - t1));
      6  end;
      7  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:02.80
    SQL> declare
      2  t1 timestamp := systimestamp;
      3  begin
      4    execute immediate 'begin for c in (' || :p_sql || ') loop null; end loop; end;';
      5    dbms_output.put_line('Elapsed: ' || (systimestamp - t1));
      6  end;
      7  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:02.64
    SQL>
    https://forums.oracle.com/thread/705536?start=15&tstart=0
    Regards
    Girish Sharma

Maybe you are looking for

  • Show error and test error

    I have used oracle 9.2 for 3 months. I install oralce client 9.0 in my computer. when I write stored procedure. I used SQL Plus to compile. We use package to wrap a store proceure in sql file. we use ref cursor variable to reture record sets to clien

  • Can someone help with 10.5.8 Flash Player?

    I've been struggling with my MacOS 10.5.8. I AM ABLE watch videos on YouTube, but (i dont have cable so i watch shows online) on sites like mtv.com. I just get the spinning circle, no sound, no nothing. I tried everything I could find. I read threw t

  • Mac book iSight camera

    my computer is not recognizing its camera. I have tried the following: 1. remove from power cord, shut down and remove battery. 2. press and hold power button for 10 seconds 3. replace battery 4. restart computer, while holding down option + apple ke

  • Can i download books on an ipod like on them ebooks?

    can i download books in a ipod like in a ebook?

  • Jbo vs ejb

    Here's a real novice question: trying to use the demos and tutorials to get me started with my web project. Some seem to use (sorry if I am getting terminologies wrong) an EJB approach with pojos which are exposed to the view side through Session Bea