System commands - disk access
To emulate the "clrscr" command (from C), I am determining the name of the OS and then passing the appropriate command to the Runtime object:
if ((menu.osName.lastIndexOf("sun") != -1) || (menu.osName.lastIndexOf("inux") != -1))
System.out.println("This is an unix terminal");
menu.clearCommand = "/usr/bin/clear";
else if (menu.osName.lastIndexOf("indow") != -1)
System.out.println("This is a Windows MS-DOS terminal");
menu.clearCommand = "C:\\Windows\\Command\\cls";
else if (menu.osName.lastIndexOf("dos") != -1)
System.out.println("This is a MS-DOS terminal");
menu.clearCommand = "C:\\DOS\\cls";
try
menu.cls = Runtime.getRuntime().exec(menu.clearCommand);
menu.cls.waitFor();
menu.clsOut = new BufferedReader(new InputStreamReader(menu.cls.getInputStream()));
while (menu.clsOut.ready())
System.out.println(menu.clsOut.readLine());
menu.clsOut.close();
catch (Exception e)
-However, I also want to make sure that the system command is not an alias for a malicious script, in terms of invoking any sort of IO (delete/create files, etc.). Is it possible to have some sort of wrapper mechanism around the execution of the system command to detect and catch any attempt to perform IO? So far, my application works as the code speaks out, but I am worried that the system command may not be what I expect.
Thanks.
--Ashwin
What about making the information you need to clear the screen a part of the installation?
You do
clear >myclear.out
cls >myclear.out
or whatever and use the contents of the "clear screen" file from your Java program.
Caveat however: under Unix you can have different types of terminal with different clear-screen sequences.
Sometimes I ponder to make a request for a curses-like java package to give an API for such (more advanced, but still CUI-related) things. Or maybe there is such without my knowing it?
Similar Messages
-
[SOLVED] Long time with excessive disk access before system reboot.
I feel I would be grateful for some help here. It's my first go at Arch Linux having used Xubuntu for several years. It may be I'm missing something obvious but then I would be happy if someone could point me in the right direction.
Problem: When I do a system restart by issuing
$ systemctl reboot
I get the following output
Sending SIGTERM to remaining processes...
Sending SIGKILL to remaining processes...
Unmounting file systems.
Unmounted /sys/kernel/debug.
Unmounted /dev/hugepages.
Unmounted /dev/mqueue.
Not all file systems unmounted, 1 left.
Disabling swaps.
Detaching loop devices.
Detaching DM devices.
Unmounting file systems.
Not all file systems unmounted, 1 left.
Cannot finalize remaining filesystems and devices, giving up.
Successfully changed into root pivot.
Unmounting all devices.
Detaching loop devices.
Diassembling stacked devices.
mdadm: stopped /dev/md126
[ 1654.867177] Restarting system.
However, after the last line is printed, the system does not reboot immediately but hangs for about 2 minutes with heavy disk activity. I can't say if it is read or write or both, but the led of my HDD is lit constantly. When this activity stops, the machine reboots.
$ systemctl poweroff
works as expected, i.e. shuts down immediately without excessive disk access.
I see this behaviour both with the installed Arch system and when I run the live installation/recovery CD. It is also the same if I boot into the busybox rescue shell and then restarts the machine from there. It also does not seem to matter if any partition on the disk is is mounted or not, the behaviour is always the same with 2 min. heavy activity before reboot.
System setup:
Sony Vaio VPZ13. Intel Core i5 M460, 4GB ram, 2x64GB SSD in RAID0 configuration via bios setting (a.k.a. fake raid), partitioned like:
windows boot
windows system
linux swap
linux "/"
linux "/home"
So it's a dual boot setup with Windows 7.
The raid array is assembled by mdadm, and I have mdadm_udev among my mkinitcpio.conf hooks (after blocks but before filesystems).
Snip from journalctl log showing actions when reboot has been issued:
jan 18 12:24:23 wione systemd[1]: Stopping Sound Card.
jan 18 12:24:23 wione systemd[1]: Stopped target Sound Card.
jan 18 12:24:23 wione systemd[1]: Stopping Bluetooth.
jan 18 12:24:23 wione systemd[1]: Stopped target Bluetooth.
jan 18 12:24:23 wione systemd[1]: Stopping Graphical Interface.
jan 18 12:24:23 wione systemd[1]: Stopped target Graphical Interface.
jan 18 12:24:23 wione systemd[1]: Stopping Multi-User.
jan 18 12:24:23 wione systemd[1]: Stopped target Multi-User.
jan 18 12:24:23 wione systemd[1]: Stopping Login Prompts.
jan 18 12:24:23 wione systemd[1]: Stopped target Login Prompts.
jan 18 12:24:23 wione systemd[1]: Stopping Getty on tty1...
jan 18 12:24:23 wione systemd[1]: Stopping Login Service...
jan 18 12:24:23 wione login[333]: pam_unix(login:session): session closed for user root
jan 18 12:24:23 wione login[333]: pam_systemd(login:session): Failed to connect to system bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
jan 18 12:24:23 wione systemd[1]: Stopped D-Bus System Message Bus.
jan 18 12:24:23 wione systemd[1]: Stopped Getty on tty1.
jan 18 12:24:23 wione systemd[1]: Stopping Permit User Sessions...
jan 18 12:24:23 wione systemd[1]: Stopped Permit User Sessions.
jan 18 12:24:23 wione systemd[1]: Stopped Login Service.
jan 18 12:24:23 wione systemd[1]: Stopping Basic System.
jan 18 12:24:23 wione systemd[1]: Stopped target Basic System.
jan 18 12:24:23 wione systemd[1]: Stopping Dispatch Password Requests to Console Directory Watch.
jan 18 12:24:23 wione systemd[1]: Stopped Dispatch Password Requests to Console Directory Watch.
jan 18 12:24:23 wione systemd[1]: Stopping Daily Cleanup of Temporary Directories.
jan 18 12:24:23 wione systemd[1]: Stopped Daily Cleanup of Temporary Directories.
jan 18 12:24:23 wione systemd[1]: Stopping Sockets.
jan 18 12:24:23 wione systemd[1]: Stopped target Sockets.
jan 18 12:24:23 wione systemd[1]: Stopping D-Bus System Message Bus Socket.
jan 18 12:24:23 wione systemd[1]: Closed D-Bus System Message Bus Socket.
jan 18 12:24:23 wione systemd[1]: Stopping System Initialization.
jan 18 12:24:23 wione systemd[1]: Stopped Setup Virtual Console.
jan 18 12:24:23 wione systemd[1]: Unmounting Temporary Directory...
jan 18 12:24:23 wione systemd[1]: Unmounted Temporary Directory.
jan 18 12:24:23 wione systemd[1]: Unmounted /home.
jan 18 12:24:23 wione systemd[1]: Starting Unmount All Filesystems.
jan 18 12:24:23 wione systemd[1]: Reached target Unmount All Filesystems.
jan 18 12:24:23 wione systemd[1]: Stopping Local File Systems (Pre).
jan 18 12:24:23 wione systemd[1]: Stopped target Local File Systems (Pre).
jan 18 12:24:23 wione systemd[1]: Stopping Remount Root and Kernel File Systems...
jan 18 12:24:23 wione systemd[1]: Stopped Remount Root and Kernel File Systems.
jan 18 12:24:23 wione systemd[1]: Starting Shutdown.
jan 18 12:24:23 wione systemd[1]: Reached target Shutdown.
jan 18 12:24:23 wione systemd[1]: Starting Save Random Seed...
jan 18 12:24:23 wione systemd[1]: Starting Update UTMP about System Shutdown...
jan 18 12:24:23 wione systemd[1]: Started Save Random Seed.
jan 18 12:24:23 wione systemd[1]: Started Update UTMP about System Shutdown.
jan 18 12:24:23 wione systemd[1]: Starting Final Step.
jan 18 12:24:23 wione systemd[1]: Reached target Final Step.
jan 18 12:24:23 wione systemd[1]: Starting Reboot...
jan 18 12:24:23 wione systemd[1]: Shutting down.
jan 18 12:24:23 wione systemd-journal[189]: Journal stopped
-- Reboot --
Since I have used Xubuntu without hassle for several years, I first thought the problem may be related to systemd reboot and something in my system setup. But I have tried the Fedora 17 live CD and rebooting there works as expected. So, since it works in one systemd distro, it should work with Arch as well.
Then I thought that it maybe had something to do with the raid-array, something along the lines of
https://bugzilla.redhat.com/show_bug.cgi?id=752593
https://bugzilla.redhat.com/show_bug.cgi?id=879327
But then I found the shutdown hook for mkinitcpio and now I see that the array is stopped and dissassembled. So thats not the problem either. (Or thats what I guess at least.)
Unfortunately I'm out of ideas. Any help would be grateful.
Last edited by wingbrant (2013-02-02 22:20:20)It turned out that the magic word for me was "reboot=pci" on the kernel command line. With that option set it works lika a charm The machine reboots nice and clean.
-
Time machine disk access on almost allthe time
Hi, I have an external disk set up for Time Machine. So far it seems to be working ok. The only thing I notice is that the access light on the disk is on almost all the time. Even when the system is a sleep?
I'm not sure if there is actually disk access going on or the light is just on. I do see the light go out for a few seconds now and then. So is it normal to have accessing the disk all the time?
Thanks.
Pat.oldpeddler wrote:
I have a 1 gig time machine drive for backup and it always shows the drive as "locked" even when it is unlocked. (The lock at the bottom is open, but there is a lock on the large disk icon) It won't allow me to create a new folder no matter what I do.
Is a time machine drive 100% dedicated?
no. the fact that yours is locked is not normal. run the following terminal command (copy and paste please)
sudo chflags 0 /Volumes/*
you'll have to enter your admin password (which you won't see). that's normal. -
Error "NOTICE: [0] disk access failed" during guest domain network booting
Hi,
Could you please tell me what is the problem with my configuration?
I created guest domain on my T1000 server.
As a disk I used disk from disk array: /dev/dsk/c0t18d0
I added disk using commands:
# ldm add-vdsdev /dev/dsk/c0t18d0 vol1@primary-vds0
# ldm add-vdisk vdisk1 vol1@primary-vds0 myldom1
# ldm set-variable auto-boot\?=false myldom1
# ldm set-variable boot-device=/virtual-devices@100/channel-devices@200/disk@0 myldom1
Then I logged to guest domain and booted from network to install OS from JumpStart server:
{0} ok boot net - install
Boot device: /virtual-devices@100/channel-devices@200/network@0 File and args: - install
Requesting Internet Address for 0:14:4f:f9:78:19
SunOS Release 5.10 Version Generic_137137-09 64-bit
Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Configuring devices.
NOTICE: [0] disk access failed.
Checking rules.ok file...
Using begin script: install_begin
Using finish script: patch_finish
Executing SolStart preinstall phase...
Executing begin script "install_begin"...
Begin script install_begin execution completed.
ERROR: No disks found
- Check to make sure disks are cabled and powered up
Solaris installation program exited.
Configuration:
[root@gt1000a /]# ldm list-bindings
NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME
primary active -n-cv- SP 4 2G 0.5% 2h 23m
MAC
00:14:4f:9f:71:4e
HOSTID
0x849f714e
VCPU
VID PID UTIL STRAND
0 0 5.3% 100%
1 1 0.5% 100%
2 2 0.5% 100%
3 3 0.4% 100%
MAU
ID CPUSET
0 (0, 1, 2, 3)
MEMORY
RA PA SIZE
0x8000000 0x8000000 2G
VARIABLES
keyboard-layout=US-English
IO
DEVICE PSEUDONYM OPTIONS
pci@780 bus_a
pci@7c0 bus_b
VCC
NAME PORT-RANGE
primary-vcc0 5000-5100
CLIENT PORT
myldom1@primary-vcc0 5000
VSW
NAME MAC NET-DEV DEVICE DEFAULT-VLAN-ID PVID VID MODE
primary-vsw0 00:14:4f:fa:ca:94 bge0 switch@0 1 1
PEER MAC PVID VID
vnet0@myldom1 00:14:4f:f9:78:19 1
VDS
NAME VOLUME OPTIONS MPGROUP DEVICE
primary-vds0 vol1 /dev/dsk/c0t18d0
CLIENT VOLUME
vdisk1@myldom1 vol1
VCONS
NAME SERVICE PORT
SP
NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME
myldom1 active -n---- 5000 12 2G 0.1% 2h 18m
MAC
00:14:4f:f9:e7:ae
HOSTID
0x84f9e7ae
VCPU
VID PID UTIL STRAND
0 4 0.5% 100%
1 5 0.0% 100%
2 6 0.0% 100%
3 7 0.0% 100%
4 8 0.0% 100%
5 9 0.0% 100%
6 10 0.0% 100%
7 11 0.0% 100%
8 12 0.0% 100%
9 13 0.0% 100%
10 14 0.0% 100%
11 15 0.0% 100%
MEMORY
RA PA SIZE
0x8000000 0x88000000 2G
VARIABLES
auto-boot?=false
boot-device=/virtual-devices@100/channel-devices@200/disk@0
NETWORK
NAME SERVICE DEVICE MAC MODE PVID VID
vnet0 primary-vsw0@primary network@0 00:14:4f:f9:78:19 1
PEER MAC MODE PVID VID
primary-vsw0@primary 00:14:4f:fa:ca:94 1
DISK
NAME VOLUME TOUT DEVICE SERVER MPGROUP
vdisk1 vol1@primary-vds0 disk@0 primary
VCONS
NAME SERVICE PORT
myldom1 primary-vcc0@primary 5000
[root@gt1000a /]#
Kind regards,
DanielIssue solved.
There was a wrong disk name:
primary-vds0 vol1 /dev/dsk/c0t18d0
I changed to c0t18d0s2 and now I sucessfuly installed OS from Jumpstart. -
Slow hard disk access --- still wonky
Hi,
Recently i've noticed that hard disk access has become very laggy, to the point
where it's driving me crazy.
For example, if i want to tab-complete through my directories, i have to wait a
few seconds each time. Similarly with saving files in vim, or just using
firefox, which seems to suffer frequent hangs while the disk is spinning.
I tried downgrading the kernel to 3.4.something, to no avail (it definitely used
to work just fine with the old kernels). I've also tried adding "commit=60" to
my fstab to reduce journalling access.
I ran bonnie++ and the following results came back:
Version 1.03e ------Sequential Output------ --Sequential Input- --Random-
-Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
mattdell 7672M 102163 88 106118 6 38973 3 83155 67 124734 4 207.5 0
------Sequential Create------ --------Random Create--------
-Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
16 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++
mattdell,7672M,102163,88,106118,6,38973,3,83155,67,124734,4,207.5,0,16,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++
t
which (by comparison with other results i've seen online) seem to indicate
there's nothing particularly wrong with the disk (it's a toshiba 7200rpm, i
think).
So i'm at a bit of a loss what to do next. I've attached my dmesg output. If
anyone has any suggestions, that would be awesome.
Dmesg output: http://pastebin.com/kJcbZVBT
Thanks,
Matt
Last edited by yourealwaysbe (2012-11-11 14:41:24)Arf -- i noticed firefox was still laggy last night, and on a (second or third) reboot this morning, things are back to being laggy even without having run firefox...
I'm not sure where to look, but here's the output of mount if that will be of any use:
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=1962404k,nr_inodes=490601,mode=755)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
/dev/sda3 on / type ext4 (rw,relatime,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=27,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,relatime)
/dev/sda1 on /boot type ext2 (rw,relatime)
/dev/sda4 on /home type ext4 (rw,relatime,data=ordered)
All suggestions appreciated
edit: also, nothing untoward reported by top (i don't think):
top - 15:52:02 up 16 min, 0 users, load average: 0.36, 0.41, 0.30
Tasks: 104 total, 2 running, 102 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.1 us, 0.2 sy, 0.0 ni, 99.8 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem: 3930516 total, 779240 used, 3151276 free, 51616 buffers
KiB Swap: 2626620 total, 0 used, 2626620 free, 285284 cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 20 0 32552 3432 1924 S 0.0 0.1 0:00.51 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root 20 0 0 0 0 S 0.0 0.0 0:00.04 ksoftirqd/0
4 root 20 0 0 0 0 S 0.0 0.0 0:00.14 kworker/0:0
5 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0H
7 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/u:0H
8 root rt 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
9 root rt 0 0 0 0 S 0.0 0.0 0:00.00 watchdog/0
10 root rt 0 0 0 0 S 0.0 0.0 0:00.00 migration/1
The lag tends to occur when first tabbing into a directory. On the second time
tabbing through things seem to be fast -- i guess that's cached somewhere.
editedit: i also tried switching back to initscripts, with no improvement, so i guess systemd is off the hook for the remaining problems
Last edited by yourealwaysbe (2012-11-11 15:13:57) -
Extremely slow disk access iMac5.1
Hello, my daughter is having problems with her computer. She has a Mac5.1 ( intel ) running 10.4.11.
In the process of trying to determine the problem, I installed Xbench on her computer. The numbers for the disk access category are dismal, all others (although low) appear normal.
This disk values are:
Sequential 0.03
Uncached Write 0.01 0.01 MB/sec [4K blocks]
Uncached Write 0.17 0.10 MB/sec [256K blocks]
Uncached Read 60.40 17.68 MB/sec[4K blocks]
Uncached Read 86.73 43.59 MN/sec[256K blocks]
Random 1.35
Uncached Write 15.89 0.01 MB/sec [4K blocks]
Uncached Write 0.35 0.10 MB/sec [256K blocks]
Uncached Read 63.58 17.68 MB/sec[4K blocks]
Uncached Read 99.67 43.59 MN/sec[256K blocks
Aparently sequential access is much worse that random access however Apple utilities as well as Onyx claims that the disk is fine. However the computer is nearly unusable. What else can I try? I ran an fsck on the disk, I also caused the write permissions to be corrected. I am running out of ideas.
BTW her disk is a WDC WD160JS-40TGB0. Out of 148 Gig, 110 are used and about 40 are free.
Any Ideas? Any help is greatly appreciated.How much RAM does the iMac have and how many Applications are running concurrently or set to open at login?
40GB should be ample free space for V-RAM, but it could definitely get bogged down if there is to little RAM for the users needs.
Sometimes one will inadvertently set a bunch of stuff to automatically open at login. Go to: Apple > System Preferences > Accounts > Login Items and remove any unnecessary Application automatically set to open at login-in and then restart the computer.
Then again it could be that the HD is just suffering from age, if it has been thrashed because of continual page outs due to the lack of system memory. Because my Earlier 2006 Mac4,1 with 2GB of RAM that I upgraded (for space reasons) to a WD 320GB Hard Drive in 2009 is getting:
Disk Test
55.08
Sequential
47.67
Uncached Write
177.90
109.23 MB/sec [4K blocks]
Uncached Write
175.61
99.36 MB/sec [256K blocks]
Uncached Read
14.73
4.31 MB/sec [4K blocks]
Uncached Read
211.81
106.45 MB/sec [256K blocks]
Random
65.23
Uncached Write
25.42
2.69 MB/sec [4K blocks]
Uncached Write
182.78
58.51 MB/sec [256K blocks]
Uncached Read
93.31
0.66 MB/sec [4K blocks]
Uncached Read
172.38
31.99 MB/sec [256K blocks]
Dennis -
Dual Boot - Solaris 8 intel under system commander
I am interesting in installing Solaris 8 for intel on my PC but need to keep my existing operating environments (98 and NT). I would like to install solaris on either a spare partition or spare disk drive.
Has anyone managed to configure solaris 8 to boot from system commander deluxe. I know it is possible with Solaris 7 but I have no documentation on for Solaris 8. I cant seem to get through to the System Commander people.hi phil_xxx
I am using a dell dimension 4100 machine. I already have win200,win98 in the primary drive(10GB) using using 'System Commander' as boot manager to select the OS( to boot into).
I installed slave disk(30GB-IBM)and have been trying with all the possibilities to get the solaris(version-6/00)installed on the slave disk. I used "Solaris 8 Software 1/2" CD. I was not able to get solaris installed on second(slave) disk evenwitth the single user mode.
Looking for ur help badly if u have got any result.
-Nalla ([email protected]) -
Operating System commands in FTP adapter
Hi
I have a requirement to use "Operating System Command" option in the Sender/Receiver side File Adapter.
And in help.sap.com they have brief notes on this.
http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
When I tried to execute some valid DOS commands like MKDIR,RENAME etc it didn't work at all.
But process has been sucessfully completed without any error!!!
System : XI 3.0 SP 11
Can anyone has any inputs on this ? Pls share me some ideas with example. Is there is any limitations on this feature?
Note: When I tried to give invalid commands hfjkhfkasdjfh,asdjdhas etc, still it is not giving any error!!. Still my File Adapter as well as entire process is successfully completed.Hi,
A couple of cautionary notes.
The OS command is executed after the file has been processed, e.g. read successfully by a sender adapter or created successfully by a receiver adapter.
The file name processed can be accessed using %f in the OS command.
The OS command must include the full directory path, or XI will assume the current directory which may not be where your command resides.
Regards,
Bill -
PerfMon reporting dramatic disk access time increase on Oracle startup
Hi,
My oracle 10g (10.2.0.4) database is hosted on a windows 2003 server.
The datafiles are stored on a RAID1 disk array, on a dedicated partition : currently 30 gigs free out of 180, wich should not be a concern unless i'm wrong, because the datafiles were created as 10 Go files with no autogrowth. I add a new datafile whenever i need more room for my tables (alerts when 80% used).
Since 2 days i experience a dramatic performance loss :
The EM console reports nothing special (no alarms related to storage) apart from the need for more paginated memory.
I issue a reorg when the segmentation advisor suggests it.
My optimizer statistics are calculated by the default scheduled job.
The weird thing I noticed is that as soon as I start the database, there's a huge increase in disk activity even though no query at all is submitted to the database.
PerfMon reports Current Disk Queue Length > 1000 and disk access time > 3000 ms
CPU is 2% activity on the 4-cpus server.
I have plenty of spare memory (currently 3 Go used out of 16).
This is only a dev server for ETL processes, it has very few concurrent connections.
Any suggestions welcome.
AWR report is available here
http://min.us/mqnXQhd5Z
Edited by: user10799939 on 22 mars 2012 09:30Cache Sizes
~~~~~~~~~~~ Begin End
Buffer Cache: 1,296M 1,296M Std Block Size: 8K
Shared Pool Size: 160M 160M Log Buffer: 14,364K
Load Profile
~~~~~~~~~~~~ Per Second Per Transaction
Redo size: 460,955.72 ; 2,477,358.63
Logical reads: 3,392.16 ; 18,230.80
Block changes: 6,451.93 ; 34,675.22
Physical reads: 2.92 ; 15.67
Physical writes: 394.52 ; 2,120.28
User calls: 1.69 ; 9.08
Parses: 3.31 ; 17.81
Hard parses: 0.17 ; 0.90
Sorts: 1.32 ; 7.09
Logons: 0.06 ; 0.31
Executes: 7.01 ; 37.68
Transactions: 0.19
% Blocks changed per Read: 190.20 ; Recursive Call %: 96.23
Rollback per transaction %: 0.30 ; Rows per Sort: 14.41
Instance Efficiency Percentages (Target 100%)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Buffer Nowait %: 99.98 ; Redo NoWait %: 99.86
Buffer Hit %: 99.92 ; In-memory Sort %: 100.00
Library Hit %: 96.30 ; Soft Parse %: 94.96
Execute to Parse %: 52.74 ; Latch Hit %: 99.07
Parse CPU to Parse Elapsd %: 0.35 ; % Non-Parse CPU: 99.30
Shared Pool Statistics Begin End
Memory Usage %: 75.48 ; 75.51
% SQL with executions>1: 79.92 ; 85.03
% Memory for SQL w/exec>1: 77.07 ; 70.09
Top 5 Timed Events Avg %Total
~~~~~~~~~~~~~~~~~~ wait Call
Event Waits Time (s) (ms) Time Wait Class
db file sequential read 9,052 17,688 1954 51.3 ; User I/O
log file switch (checkpoint in 5,303 4,649 877 13.5 Configurat
log file switch completion 4,245 4,023 948 11.7 Configurat
wait for a undo record 32,393 3,531 109 10.3 ; Other
db file parallel write 18,771 3,437 183 10.0 System I/O Havent seen this much wait on average. For example 877ms for "log file switch" is over threshold. And other wait events too..
Time Model Statistics DB/Inst: MDMPRJ/MDMPRJ Snaps: 2840-2841
-> Total time in database user-calls (DB Time): 34446.5s
-> Statistics including the word "background" measure background process
time, and so do not contribute to the DB time statistic
-> Ordered by % or DB time desc, Statistic name
Statistic Name Time (s) % of DB Time
sql execute elapsed time 4,008.5 ; 11.6
parse time elapsed 352.9 ; 1.0
hard parse elapsed time 352.7 ; 1.0
PL/SQL compilation elapsed time 120.1 ; .3
DB CPU 61.8 ; .2
failed parse elapsed time 21.3 ; .1
PL/SQL execution elapsed time 8.0 ; .0
connection management call elapsed time 0.0 ; .0
hard parse (sharing criteria) elapsed time 0.0 ; .0
repeated bind elapsed time 0.0 ; .0
hard parse (bind mismatch) elapsed time 0.0 ; .0
DB time 34,446.5 ; N/A
background elapsed time 14,889.7 ; N/A
background cpu time 39.0 ; N/A
Wait Class DB/Inst: MDMPRJ/MDMPRJ Snaps: 2840-2841
-> s - second
-> cs - centisecond - 100th of a second
-> ms - millisecond - 1000th of a second
-> us - microsecond - 1000000th of a second
-> ordered by wait time desc, waits desc
Avg
%Time Total Wait wait Waits
Wait Class Waits -outs Time (s) (ms) /txn
User I/O 10,515 .1 17,785 1691 15.8
Configuration 10,186 79.5 ; 8,865 870 15.3
System I/O 27,619 .0 8,774 318 41.6
Other 57,768 98.3 ; 6,915 120 87.0
Commit 2,634 88.6 ; 2,481 942 4.0
Concurrency 2,847 75.4 ; 2,240 787 4.3
Application 219 2.3 ; 23 105 0.3
Network 4,790 .0 0 0 7.2
------------------------------------------------------------- again seen, there is very high wait on User IO
Wait Events DB/Inst: MDMPRJ/MDMPRJ Snaps: 2840-2841
-> s - second
-> cs - centisecond - 100th of a second
-> ms - millisecond - 1000th of a second
-> us - microsecond - 1000000th of a second
-> ordered by wait time desc, waits desc (idle events last)
Avg
%Time Total Wait wait Waits
Event Waits -outs Time (s) (ms) /txn
db file sequential read 9,052 .0 17,688 1954 13.6
log file switch (checkpoint 5,303 78.0 ; 4,649 877 8.0
log file switch completion 4,245 89.2 ; 4,023 948 6.4
wait for a undo record 32,393 99.8 ; 3,531 109 48.8
db file parallel write 18,771 .0 3,437 183 28.3
wait for stopper event to be 24,203 99.8 ; 2,634 109 36.5
log file sync 2,634 88.6 ; 2,481 942 4.0
control file sequential read 7,356 .0 2,431 330 11.1
buffer busy waits 2,513 83.1 ; 2,173 865 3.8
log file parallel write 520 .0 1,566 3012 0.8
control file parallel write 840 .0 1,334 1588 1.3
rdbms ipc reply 172 91.3 ; 330 1916 0.3
enq: CF - contention 309 23.0 ; 268 867 0.5
log buffer space 638 28.5 ; 192 301 1.0
enq: PS - contention 52 23.1 ; 71 1362 0.1
db file scattered read 113 .0 67 590 0.2
os thread startup 76 77.6 ; 63 834 0.1
reliable message 57 78.9 ; 50 878 0.1
enq: RO - fast object reuse 22 22.7 ; 23 1038 0.0
latch free 537 .0 16 30 0.8
Streams AQ: qmn coordinator 3 100.0 ; 15 5005 0.0 Overstepping
Background Wait Events DB/Inst: MDMPRJ/MDMPRJ Snaps: 2840-2841
-> ordered by wait time desc, waits desc (idle events last)
Avg
%Time Total Wait wait Waits
Event Waits -outs Time (s) (ms) /txn
db file parallel write 18,772 .0 3,437 183 28.3
events in waitclass Other 24,367 99.5 ; 3,010 124 36.7
control file sequential read 6,654 .0 2,333 351 10.0
log file parallel write 520 .0 1,566 3012 0.8
control file parallel write 840 .0 1,334 1588 1.3
buffer busy waits 899 94.2 ; 884 984 1.4
log file switch (checkpoint 206 82.0 ; 185 898 0.3
os thread startup 76 77.6 ; 63 834 0.1
log file switch completion 46 93.5 ; 45 982 0.1
log buffer space 158 31.0 ; 12 77 0.2
db file sequential read 62 .0 7 111 0.1
db file scattered read 20 .0 6 318 0.0
direct path read 660 .0 5 7 1.0
log file sequential read 66 .0 4 65 0.1
log file single write 66 .0 1 16 0.1
enq: RO - fast object reuse 2 .0 0 38 0.0
latch: cache buffers chains 3 .0 0 6 0.0
direct path write 660 .0 -5 -8 1.0
rdbms ipc message 9,052 87.5 ; 21,399 2364 13.6
pmon timer 1,318 90.4 ; 3,562 2703 2.0
Streams AQ: qmn coordinator 633 97.6 ; 3,546 5602 1.0
Streams AQ: waiting for time 77 61.0 ; 3,449 44795 0.1
PX Deq: Join ACK 21 .0 0 0 0.0 Again overshooting
Tablespace IO Stats DB/Inst: MDMPRJ/MDMPRJ Snaps: 2840-2841
-> ordered by IOs (Reads + Writes) desc
Tablespace
Av Av Av Av Buffer Av Buf
Reads Reads/s Rd(ms) Blks/Rd Writes Writes/s Waits Wt(ms)
UNDOTBS1
914 0 ###### 1.0 ; 1,368,515 383 2,534 863.2
MDMREF_INDICES
6,918 2 ###### 1.0 ; 11,086 3 0 0.0
SYSAUX
626 0 ###### 1.1 ; 1,804 1 0 0.0
SYSTEM
850 0 ###### 1.7 ; 296 0 0 0.0
MDMREF_DATA
293 0 712.3 ; 1.0 ; 274 0 0 0.0
MDMPRJ_ODS
198 0 72.1 ; 1.0 ; 198 0 0 0.0
FEU_VERT
33 0 61.5 ; 1.0 ; 33 0 0 0.0
USERS
33 0 31.5 ; 1.0 ; 33 0 0 0.0
------------------------------------------------------------- Now have a serious look at it. Av Rd(ms). Now for some tablespace value cannot event fit in window thats why its showing ##
According to oracle recommendation Av Rd(ms) shouldn't be greater then 20, if its goes over 20 then its considered to be an issue with IO subsystem. But as its seen that in your case its overshooting.
Now the question from my side
Have done any configuration changes?
I would suggest you to revert these changes asap and contact storage admin guys...
Hope this helps -
System command execution.
I know this will not make my program portable, but how can you execute system commands on windows xp, 2000, 98se, and *nix? Is there a class that will allow access to this?
I'm wanting to write a front end for cdrecord, and a few others.Look at the various execute methods in Runtime.
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html
Also, you may want to read this:
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html -
How to execute System command through Applet
Hi all,
How can I execute a System command through Applet.
I have written a code Runtime.exec("ls") in my applet but it gives me
this execption even if I certify the applet ->
java.security.AccessControlException: access denied (java.io.FilePermission <<ALL FILES>> execute)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:272)
at java.security.AccessController.checkPermission(AccessController.java:399)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
at java.lang.SecurityManager.checkExec(SecurityManager.java:802)
at java.lang.Runtime.exec(Runtime.java:548)
at java.lang.Runtime.exec(Runtime.java:418)
at java.lang.Runtime.exec(Runtime.java:361)
at java.lang.Runtime.exec(Runtime.java:325)
at Test.init(Test.java:24)
at sun.applet.AppletPanel.run(AppletPanel.java:344)
at sun.plugin.navig.motif.MotifAppletViewer.maf_run(MotifAppletViewer.java:123)
at sun.plugin.navig.motif.MotifAppletViewer.run(MotifAppletViewer.java:119)
at java.lang.Thread.run(Thread.java:484)
Thanks,
Manoj.There should be a lesson about this somewhere.
When you visit a web page, does it ask you if you want to have an applet loaded?
Answer: No
So, if you visit a page, and an applet is silently loaded which can then execute commands on your computer, is this good?
Answer: No
So why do you want to do this?
Is it good for anyone?
I mean, if I want to do "ls", can't I just open a command line? Do I need an applet to do it for me?
Either you have devious desires or your hacking together something that probably shouldn't be.
If you want to learn start here:
http://java.sun.com/docs/books/tutorial/security1.2/index.html
With the article entitled:
Quick Tour of Controlling Applets
Ian -
System command from within PL/SQL on server ?
Hi
I know its a bit weird thought of executing an NT system command from within PL/SQL on server (UNIX).
Has anyone done something (silly me!) like it or knows any work-around to try something like it?
Thanks in advance.
Regards
PraveshCan you be more specific?
Generally to run system commands you utilize DBMS_PIPE to communicate with a listener on the platform that you're accessing. That listener picks up the pipe request and might either:
1. spawn a process to run the command
2. fork a process to run the command
3. run the command within its own application.
It sounds complex, but if review the DBMS_PIPE documentation and it's not too difficult -- presuming you know a language like C.
I believe there are other features in 8.1.5 and higher versions that enable you to run stored programs or COM objects...
Bill -
i just installed Arch Duke some hours ago and then i did "pacman -Syu". everything is running fine but sometimes, 1-3 times a day, i see unnecessary disk-access. when you access the disk e.g copying the files from one place to the other then you can see the red LED of the cabinet (representing the Hard-Disk) glowing.
i did not set up any cron jobs and nothing is running right now but my OS is accessing the hard-disk, continuously for 10 min. why this is happening ?mouse256 wrote:Well, it seems something is running
I do a guess: have you beagle running?
maybe a dump of "ps aux" would be nice, then we can maybe identify what's causing it...
[arnuld@arch ~]$ ps -aux
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 1588 548 ? Ss Jun29 0:00 init [3]
root 2 0.0 0.0 0 0 ? S Jun29 0:00 [migration/0]
root 3 0.0 0.0 0 0 ? SN Jun29 0:00 [ksoftirqd/0]
root 4 0.0 0.0 0 0 ? S Jun29 0:00 [watchdog/0]
root 5 0.0 0.0 0 0 ? S< Jun29 0:01 [events/0]
root 6 0.0 0.0 0 0 ? S< Jun29 0:00 [khelper]
root 7 0.0 0.0 0 0 ? S< Jun29 0:00 [kthread]
root 30 0.0 0.0 0 0 ? S< Jun29 0:00 [kblockd/0]
root 31 0.0 0.0 0 0 ? S< Jun29 0:00 [kacpid]
root 136 0.0 0.0 0 0 ? S< Jun29 0:00 [kseriod]
root 161 0.0 0.0 0 0 ? S< Jun29 0:01 [kswapd0]
root 162 0.0 0.0 0 0 ? S< Jun29 0:00 [aio/0]
root 300 0.0 0.0 0 0 ? S< Jun29 0:00 [ata/0]
root 301 0.0 0.0 0 0 ? S< Jun29 0:00 [ata_aux]
root 305 0.0 0.0 0 0 ? S< Jun29 0:00 [scsi_eh_0]
root 306 0.0 0.0 0 0 ? S< Jun29 0:00 [scsi_eh_1]
root 323 0.0 0.0 0 0 ? S< Jun29 0:00 [scsi_eh_2]
root 324 0.0 0.0 0 0 ? S< Jun29 0:00 [scsi_eh_3]
root 1117 0.0 0.0 0 0 ? S< Jun29 0:01 [kjournald]
root 1152 0.0 0.0 0 0 ? S< Jun29 0:00 [ksuspend_usbd]
root 1155 0.0 0.0 0 0 ? S< Jun29 0:00 [khubd]
root 1171 0.0 0.0 1768 632 ? S<s Jun29 0:01 /sbin/udevd --daemon
root 1704 0.0 0.0 0 0 ? S< Jun29 0:00 [kgameportd]
root 4639 0.0 0.0 0 0 ? S< Jun29 0:00 [kpsmoused]
root 5453 0.0 0.1 6580 1868 ? Ss Jun29 0:00 /usr/sbin/cupsd
root 5485 0.0 0.0 0 0 ? S< Jun29 0:01 [kjournald]
root 5488 0.0 0.0 0 0 ? S< Jun29 0:00 [kjournald]
root 5538 0.0 0.0 2080 764 ? Ss Jun29 0:00 /usr/sbin/syslog-ng
root 5566 0.0 0.0 1620 556 ? S Jun29 0:00 /usr/sbin/crond
root 5572 0.0 0.0 1588 512 tty3 Ss+ Jun29 0:00 /sbin/agetty 38400 vc/3 linux
root 5573 0.0 0.0 1588 512 tty4 Ss+ Jun29 0:00 /sbin/agetty 38400 vc/4 linux
root 5574 0.0 0.0 1584 508 tty5 Ss+ Jun29 0:00 /sbin/agetty 38400 vc/5 linux
root 5575 0.0 0.0 1584 508 tty6 Ss+ Jun29 0:00 /sbin/agetty 38400 vc/6 linux
root 11282 0.0 0.0 0 0 ? S Jun29 0:00 [pdflush]
root 11789 0.0 0.0 0 0 ? S Jun29 0:00 [pdflush]
root 15018 0.0 0.1 2296 1100 tty2 Ss Jun29 0:00 /bin/login --
arnuld 15031 0.0 0.1 4524 1748 tty2 S Jun29 0:00 -bash
root 16726 0.0 0.1 2296 1096 tty1 Ss Jun29 0:00 /bin/login --
root 16727 0.0 0.1 4264 1720 tty1 S+ Jun29 0:00 -bash
root 19337 0.0 0.1 2600 1160 ? S 00:02 0:00 /bin/sh /usr/sbin/run-cron /etc/cron.daily
root 19529 0.0 0.1 4084 1400 ? S 00:02 0:00 /bin/sh /etc/cron.daily/whatis
root 19534 0.0 0.1 4216 996 ? S 00:02 0:00 /bin/sh /etc/cron.daily/whatis
arnuld 20892 0.0 0.1 4480 1392 tty2 S+ 00:02 0:00 /bin/sh /usr/bin/startx
arnuld 20908 0.0 0.0 2568 716 tty2 S+ 00:02 0:00 xinit /home/arnuld/.xinitrc -- -auth /home/arnuld/.serveraut
root 20909 12.6 1.2 16232 12480 tty7 S<s+ 00:02 0:01 X :0 -auth /home/arnuld/.serverauth.20892
arnuld 21001 0.1 0.1 4564 1652 tty2 S 00:03 0:00 wmiiwm -a unix /tmp/ns.arnuld.:0/wmii -r /etc/wmii-3.5/wmiir
arnuld 21006 0.0 0.0 0 0 ? Zs 00:03 0:00 [wmiirc] <defunct>
arnuld 21020 0.0 0.1 4476 1368 ? S 00:03 0:00 /bin/sh /etc/wmii-3.5/status
arnuld 21054 0.0 0.1 4352 1352 ? S 00:03 0:00 /bin/sh /usr/bin/wmiir read /event
arnuld 21055 0.0 0.0 1600 340 ? S 00:03 0:00 ixpc read /event
arnuld 21056 0.0 0.0 4480 896 ? S 00:03 0:00 /bin/sh /etc/wmii-3.5/wmiirc
root 21228 7.5 0.1 4276 1808 ? S 00:03 0:00 /bin/awk ??? function readline() {?? if (use_zcat ||
arnuld 21417 2.5 0.6 11268 6168 ? S 00:03 0:00 urxvt
arnuld 21480 1.0 0.1 4520 1744 pts/0 Ss 00:03 0:00 -bash
arnuld 21569 0.0 0.0 3060 476 ? S 00:03 0:00 sleep 1
root 21605 0.0 0.0 1804 340 ? R 00:03 0:00 gzip -cd /usr/man/man2/./time.2.gz
arnuld 21606 0.0 0.1 3552 988 pts/0 R+ 00:03 0:00 ps -aux
[arnuld@arch ~]$ f -
HEAVY disk access and I can't figure out what's doing it
Since installing Snow Leopard, I'm running into period of heavy disk usage (not idle). I can't seem to figure out what it is, because as soon as I get Activity Monitor up, it's calmed down. It's similar in usage to Spotlight indexing, but that's not what it is. The only thing I notice is the Quick Look Helper seems to at 16% CPU usage when this happens, quickly dropping below 1%. Anyone have any ideas of what I might look for? Is there a log I could check to see disk access?
Hi,
You could look at the Console.app in the Utilities folder and the 'top' command in the Terminal.app -
SQL 2005 Enterprise
Even if I logon as Administrator and try to backup any of my databases to local partitions, I get this error below. I have been operating fine up until this point and doing backups all the time. As far as I know, and after checking, no permissions have changed and of course Administrator has ntfs permissions to my local C and other partitions on this server:
TITLE: Microsoft SQL Server Management Studio
Backup failed for Server 'servername'. (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Backup+Server&LinkId=20476
ADDITIONAL INFORMATION:
System.Data.SqlClient.SqlError: Cannot open backup device 'F:\foldername'. Operating system error 5(Access is denied.). (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&LinkId=20476
BUTTONS:
OK
In the Event log for Windows Server 2003 I see this:
Event Type: Error
Event Source: DCOM
Event Category: None
Event ID: 10016
Date: 3/6/2006
Time: 3:35:06 PM
User: NT AUTHORITY\NETWORK SERVICE
Computer: servername
Description:
The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID
{BA126AD1-2166-11D1-B1D0-00805FC1270E}
to the user NT AUTHORITY\NETWORK SERVICE SID (S-1-5-20). This security permission can be modified using the Component Services administrative tool.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.SQL Service account is DOMAIN\SQLAdmin
Have given the SQLAdmin AD account access to the Backup shares on the file servers (2 file servers, FILE1, FILE2)
and I still get the error
Operating system error 5(Access is denied.).
RESTORE FILELISTONLY
FROM DISK = N'\\SERVER\APPS\backups\UA\DB\DB.BAK'
I trid to attach it as device, which runs
sp_addumpdevice 'disk', 'Network_Share', '\\SERVER\backup\APPS\UA\DB\DB.BAK'
BUT when restoring, same error occurred (Access denied)
Only case I can backup/restore to/from network shares, is from the machines where SQL Server runs (SQL1, SQL2)
e.g. I copy the BAK file from FILE1 to SQL2, share the folder (add SQLAdmin account with access), then restore on SQL1 with file from SQL2 Share
RESTORE FILELISTONLY
FROM DISK = N'\\SQL2\backups\UA\DB\DB.BAK'
Maybe you are looking for
-
Change the colour of the outer line of a circle
Hello everyone, I drew up a circle with no fill inside, to show where the location of my highway storm culvert will be. I changed the thickness of the outer line of my circle shape by creating a stroke effect at layer → blending options → stroke; the
-
Multilevel Categorization in the normal Appointment View
Dear experts, We're using CRM 7.0 SP3. We're well aware that Multilevel Categorization as per Standard is supported in IC Webclient in Interaction Record View and not in the normal Appointment View (i.e. UI Component BT126H_CALL). However we want to
-
Problems reading .xmp sidecar files after moving .nefs in bridge CS6
Problem with CS6 beta. Whenever I move a set of edited (using LR4 with metadata saved to folder) .nef files in bridge to new folder, the .xmp files are not recognised in bridge. They are thre if you look in Windows explorer. If I then find the fil
-
Batch Master Changes reflecting all plant with same Batch
HI, When we are doing any change in Batch Master ( MSC2n ) for one plant like Shelf Life expiry date or Classification data for one plant. its automatically reflect on all plants for same batch. Example: Material : 123456 Batch : 10925 Shelf Life E
-
Difference between the MacBook models.
What is the difference between the models MD101LL/A, MD101LZ/A, MD101BZ/A, MD101E/A? Which means the letters that differentiate them? Thank you.