Search Results

Search found 30085 results on 1204 pages for 'read only'.

Page 24/1204 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • NRPE: Unable to read output with check_connections plugin

    - by Wlodzimierz
    I'm using plugin which gives me warning or crtis with established connections. If I run it on local machine it gives: *root@graber:/usr/lib/nagios/plugins# ./check_connections -w 1 -c 5 -C sshd CRITICAL Established connections: 6* I know, I run as root. But: Rights to the file: root@graber:/usr/lib/nagios/plugins# ls -all check_connections -rwxr-xr-x 1 nagios nagios 5459 2012-07-06 10:19 check_connections /etc/sudoers: root@graber:/usr/lib/nagios/plugins# cat /etc/sudoers Defaults env_reset root ALL=(ALL:ALL) ALL %admin ALL=(ALL) ALL nagios ALL=(ALL) NOPASSWD: /usr/bin/lsof nagios ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/ /etc/nagios/nrpe.cfg: *nrpe_user=nagios nrpe_group=nagios* *dont_blame_nrpe=1* *command_prefix=/usr/bin/sudo command[check_connections]=/usr/lib/nagios/plugins/check_connections -w 1 -c 5 -C sshd* log from remote: *2012-07-06T11:12:49+02:00 graber nrpe[25928]: Handling the connection... 2012-07-06T11:12:49+02:00 graber nrpe[25928]: Host address is in allowed_hosts 2012-07-06T11:12:49+02:00 graber nrpe[25928]: Host is asking for command 'check_connections' to be run... 2012-07-06T11:12:49+02:00 graber nrpe[25928]: Running command: /usr/lib/nagios/plugins/check_connections -w 1 -c 5 -C sshd 2012-07-06T11:19:11+02:00 graber nrpe[26100]: Return Code: 2, Output: NRPE: Unable to read output* Why is this happening? I'm out of ideas, I've searched google for 2 days now :)

    Read the article

  • "A disk read error occurred" after choosing to boot into Windows XP from GRUB

    - by kellogs
    "A disk read error occurred" appears on screen after choosing to boot into Windows XP from GRUB. [root@localhost linux]# fdisk -lu Disk /dev/sda: 160.0 GB, 160041885696 bytes 255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x48424841 Device Boot Start End Blocks Id System /dev/sda1 63 204214271 102107104+ 7 HPFS/NTFS Partition 1 does not end on cylinder boundary. /dev/sda2 204214272 255606783 25696256 af HFS / HFS+ Partition 2 does not end on cylinder boundary. /dev/sda3 255606784 276488191 10440704 c W95 FAT32 (LBA) Partition 3 does not end on cylinder boundary. /dev/sda4 276490179 312576704 18043263 5 Extended /dev/sda5 * 276490240 286709759 5109760 83 Linux /dev/sda6 286712118 310488254 11888068+ b W95 FAT32 /dev/sda7 310488318 312576704 1044193+ 82 Linux swap / Solaris Here, sda is a 160GB hard disk with quite a few partitions and 3 OSes installed. I am able to boot into Linux and Mac OS fine, but not into Windows anymore. The Windows system is located on /dev/sda1. I cannot recall how exactly have I used testdisk but it once said: Disk /dev/sda - 160 GB / 149 GiB - CHS 19458 255 63 The harddisk (160 GB / 149 GiB) seems too small! (< 169 GB / 157 GiB) Check the harddisk size: HD jumper settings, BIOS detection... So far I have tried to "fixboot" and "chkdsk" from a recovery console on the affected windows partition (/dev/sda1), the plug off power cord for 15 seconds trick, reinstalling GRUB, repairing the MFT and boot sector of the affected partition via testdisk, what next please? Thank you!

    Read the article

  • a disk read error occurred [closed]

    - by kellogs
    Hi, ¨a disk read error occurred¨ appears on screen after choosing to boot into Windows XP from GRUB. [root@localhost linux]# fdisk -lu Disk /dev/sda: 160.0 GB, 160041885696 bytes 255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x48424841 Device Boot Start End Blocks Id System /dev/sda1 63 204214271 102107104+ 7 HPFS/NTFS Partition 1 does not end on cylinder boundary. /dev/sda2 204214272 255606783 25696256 af HFS / HFS+ Partition 2 does not end on cylinder boundary. /dev/sda3 255606784 276488191 10440704 c W95 FAT32 (LBA) Partition 3 does not end on cylinder boundary. /dev/sda4 276490179 312576704 18043263 5 Extended /dev/sda5 * 276490240 286709759 5109760 83 Linux /dev/sda6 286712118 310488254 11888068+ b W95 FAT32 /dev/sda7 310488318 312576704 1044193+ 82 Linux swap / Solaris sda is a 160GB hard disk with quite a few partitions and 3 OSes installed. I am able to boot into Linux and Mac OS fine, but not into Windows anymore. The Windows system is located on /dev/sda1. I can not recall how exactly have I used testdisk but it once said that ¨The harddisk /dev/sda (160GB / 149 GB) seems too small! (< 172GB / 157GB)¨ or something simillar. So far I have tried to ¨fixboot¨ and ¨chkdsk¨ from a recovery console on the affected windows partition (/dev/sda1), the plug off power cord for 15 seconds trick, reinstalling GRUB, repairing the MFT and boot sector of the affected partition via testdisk, what next please ? Thank you!

    Read the article

  • IIS7 can't read web.config on shared Mac filesystem

    - by RobG
    I'm running a VirtualBox virtualized Windows 2008 Server on my Mac, just finished setting it up today. On it, I have SQL Server 2008, IIS and ColdFusion 9. I want to serve websites from my Mac filesystem (for development purposes). So I created a new website in IIS and pointed it at the appropriate path using a UNC path: \vboxsvr\rob\Sites\testsite, which contains the ColdFusion code and a web.config file. When I attempt to modify the file at all, or view the site in a web browser, I get an error: HTTP 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid. I did some Googling, and found several similar problems, but nothing exactly like I have. The closest one seemed to indicate permissions. So I recreated the site and set it up to allow the Administrator (in Windows) to access the stuff. That didn't help. I can read/modify the files just fine from within Windows, but IIS itself can't seem to do it. What do I need to do to fix this? Thanks!

    Read the article

  • Computer will not boot - disk read error - cannot boot from HD or DVD

    - by Grant Palin
    This is a 3 year-old system: HP a1640n. There have been no issues with it in the past. I added a video card 2 years ago, and more memory 1 year ago, both without issues. There haven't been any recent hardware changes. I did install Win7 in Oct., but there were no issues with that either. I used the computer fine two nights ago, and turned it off. Yesterday, I tried to turn it on, and got the error: "A Disk Read Error Occurred. Press CTRL ALT DEL to restart" So I restart, see the initial start screen (HP) and enter the BIOS. The hard drive and dvd drive appear to be listed, but the names are gibberish text. I tried putting a Windows disk in the dvd drive, and continued with the boot, but the disk did not get recognized. Even though the BIOS was set to check for optical media before the hard drive. Back to the error screen. If the computer would boot from a cd or dvd, I would just figure the hard drive needed replacing. But both being problematic worries me. Is this a matter of replacing both the hard drive and dvd drive, or might it be an indication of a bigger problem? Thanks for any advice.

    Read the article

  • Virtual host doesn't read .htaccess

    - by Charlie
    I just created virtual host: <VirtualHost myvirtualhost:80> ServerAdmin webmaster@myvirtualhost ServerName myvirtualhost DocumentRoot /home/myname/sites/public_html <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /home/myname/sites/public_html/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/access.log combined Alias /doc/ "/usr/share/doc/" <Directory "/usr/share/doc/"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory> It works, but it cant read .htacces file in public_html: DirectoryIndex otherindex.php I tried change all AllowOverride to All, but I get 500 error. How can I fix this ? thanks.

    Read the article

  • Windows 7 explorer crashing trying to read external hard disk

    - by Mario De Schaepmeester
    I have a 1TB Western Digital hard drive which is almost full and last time I tried to plug it into my laptop, I got a Windows dialog saying "this hard drive needs to be formatted". I did not panic because I have experienced things like this before and I know it's often solved by simply re-inserting the drive. Now however, whenever I plug it in and try to browse it in explorer by going to "computer", the explorer process crashes after a while. I simply close explorer since it takes ages trying to read the disk and nothing happens. After searching on the internet, the best thing to do would be a chkdsk. I tried it via properties in explorer (which also took a good 5 minutes to open up), locks up as well, after waiting a couple of minutes it says there's no access to the disk so a chkdsk is not possible... I want to make clear that I always use safe removal before pulling out the USB cable. Last time however, safe removal just would not work and when trying to shut down Windows, the logoff screen just would not disappear (I've waited at least 10 minutes or so) and I powered off the PC by force. This may be the cause of the problems but the disk was still recognised immediately after that. I really don't want to format this thing because it contains C: clones of 3 computers and a lot of other stuff that I don't want to re-copy. What would be the best course of action? Update I got chkdsk working via the command line. I used the /F and /R options. I already got a bunch of lines saying "file record segment X is unreadable" or whatever it is in English, my OS is Dutch. It looks bad... Will chdsk repair these errors?

    Read the article

  • How to read MAC address with python

    - by getjoefree
    Earlier, I could read MAC address with awk tools in Windows or Windows PE 4.0, but now it don't support Windows PE 4.0 64-bit. I want to get this result "set mac=A4BADB9D1E8E" with python 2.6, who could help to me. As follows: ipconfig -all|sed -nrf getmac.sed | sed -e "s/-//g" > D:\LOG\WINMAC.BAT getmac.sed: /Realtek/ { n; s/.*: ([-0-9A-F]+)/set winmac=\1/p; } and "ipconfig -all" command log as bellows ipconfig -all >mac.log Ethernet adapter Ethernet: Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . : WKSCN.WISTRON Description . . . . . . . . . . . : Realtek PCIe FE Family Controller Physical Address. . . . . . . . . : 24-B6-FD-1F-41-E7 DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes --------------------------------------- we can get Physical Address when plug in lan cable, but not plug the network cable, it is impossible to obtain IP address.

    Read the article

  • NoSQL vs Ehcache caching advise for speeding up read only mysql Database

    - by paddydub
    I'm building a Route Planner Webapp using Spring/Hibernate/Tomcat and a mysql database, I have a database containing read only data, such as Bus Stop Coordinates, Bus times which is never updated. I'm trying to make the app run faster, each time the application is run it will preform approx 1000 reads to the database to calculate a route. I have setup a Ehcache which greatly improves the read from database times. I'm now setting terracotta + Ehcache distributed caching to share the cache with multiple Tomcat JVMs. This seems a bit complicated. I've tried memcached but it was not performing as fast as ehcache. I'm wondering if a MongoDb or Redis would be better suited. I have no experience with nosql but I would appreciate if anyone has any ideas. What i need is quick access to the read only database.

    Read the article

  • How to read MAC address with sed vs python

    - by getjoefree
    Earlier, I could read MAC address with awk tools in Windows or Windows PE 4.0, but now it don't support Windows PE 4.0 64-bit. I want to get this result "set mac=A4BADB9D1E8E" with python 2.6, who could help to me. As follows: ipconfig -all|sed -nrf getmac.sed | sed -e "s/-//g" > D:\LOG\WINMAC.BAT ----------------------------------------------------------------------- getmac.sed: /Realtek/ { n; s/.*: ([-0-9A-F]+)/set winmac=\1/p; } and "ipconfig -all" command log as bellows: ipconfig -all >mac.log ---------------------- Ethernet adapter Ethernet: -------------------------- Media State . . . . . . . . . . . : Media disconnected ------------------------------------------------------ Connection-specific DNS Suffix . : WKSCN.WISTRON ------------------------------------------------ Description . . . . . . . . . . . : Realtek PCIe FE Family Controller --------------------------------------------------------------------- Physical Address. . . . . . . . . : 24-B6-FD-1F-41-E7 ----------------------------------------------------- DHCP Enabled. . . . . . . . . . . : Yes --------------------------------------- Autoconfiguration Enabled . . . . : Yes ---------------------------------------

    Read the article

  • Read.article had been denied several times

    - by Daniel Korobkov
    We've got a new beta Recommendation Bar plugin at our www.booknik.ru web-site. It works perfect when people logged it is its administrator or developer and it's not when isn casual user without any special role. We tried to submit our read.article action, but it was denied with that: The built-in read.article you submitted doesn't meet our requirements (https://developers.facebook.com/docs/opengraph/actions/builtin/#read). Please make sure your users can remove articles they shared "within" your app on each page an article appears. Once you have made the appropriate changes please delete this action, create a new one, and submit it. As for that, our plugin users have the ability to delete their activity but Facebook doesn't allow us to make this plugin public. What should we do to make it work? Thanks a lot for your help!

    Read the article

  • MongoDb vs Ehcache caching advise for speeding up read only mysql Database

    - by paddydub
    I'm building a Route Planner Webapp using Spring/Hibernate/Tomcat and a mysql database, I have a database containing read only data, such as Bus Stop Coordinates, Bus times which is never updated. I'm trying to make the app run faster, each time the application is run it will preform approx 1000 reads to the database to calculate a route. I have setup a Ehcache which greatly improves the read from database times. I'm now setting terracotta + Ehcache distributed caching to share the cache with multiple Tomcat JVMs. This seems a bit complicated. I've tried memcached but it was not performing as fast as ehcache. I'm wondering if a MongoDb would be better suited. I have no experience with nosql but I would appreciate if anyone has any ideas. All i need is quick access to the read only database.

    Read the article

  • Python (Twisted) - reading from fifo and sending read data to multiple protocols

    - by SpankMe
    Hi, Im trying to write some kind of multi protocol bot (jabber/irc) that would read messages from fifo file (one liners mostly) and then send them to irc channel and jabber contacts. So far, I managed to create two factories to connect to jabber and irc, and they seem to be working. However, I've problem with reading the fifo file - I have no idea how to read it in a loop (open file, read line, close file, jump to open file and so on) outside of reactor loop to get the data I need to send, and then get that data to reactor loop for sending in both protocols. I've been looking for information on how to do it in best way, but Im totally lost in the dark. Any suggestion/help would be highly appreciated. Thanks in advance!

    Read the article

  • OpenGL es 2.0 Read depth buffer

    - by Brian
    Hi! As far as i know, we can't read the Z(depth) value in OpenGL ES 2.0. So I am wondering how we can get the 3D world coordinates from a point on the 2D screen? Actually I have some random thoughts might work. Since we can read the RGBA value by using glReadPixels, how about we duplicate the depth buffer and store it in a color buffer(say ColorforDepth). Of course there need to be some nice convention so that we don't lose any information of the depth buffer. And then when we need a point's world coordinates , we attach this ColorforDepth color buffer to the framebuffer and then render it. So when we use glReadPixels to read the depth information at this frame. However, this will lead to 1 frame flash since the colorbuffer is a weird buffer translated from the depth buffer. I am still wondering if there is some standard way to get the depth in OpenGL es 2.0? Thx in advance!:)

    Read the article

  • C# double-quoted path name being escaped when read from file

    - by KrisTrip
    I am trying to read in a text input file that contains a list of filenames (one per line). However, I am running into an issue if the user double-quotes the path (because it has a space in it). For example, a normal input file might have: C:\test\test.tiff C:\test\anothertest.tiff C:\test\lasttest.tiff These get read in fine by my code ("C:\\test\\test.tiff" etc) However, if I have the following input file: "C:\test with spaces\test.tiff" "C:\test with spaces\anothertest.tiff" "C:\test with spaces\lasttest.tiff" These get read in double-quotes and all ("\"C:\\test with spaces\\test.tiff\"" etc). This becomes a problem when I try to open the files (I understandably get invalid character exceptions). My question is, how do I fix this? I want to allow users to input quoted strings and handle them correctly. My first impression was to just write a little method that strips off beginning or ending quotes, but I thought there might be a better way.

    Read the article

  • Programs won't write to a file, and I do not know if it is reading it

    - by user320950
    This program is supposed to read files and write them. I took the file open checks out because they kept causing errors. The problem is that the files open like they are supposed to and the names are correct but nothing is on any of the text screens. Do you know what is wrong? #include<iostream> #include<fstream> #include<cstdlib> #include<iomanip> using namespace std; int main() { ifstream in_stream; // reads itemlist.txt ofstream out_stream1; // writes in items.txt ifstream in_stream2; // reads pricelist.txt ofstream out_stream3;// writes in plist.txt ifstream in_stream4;// read recipt.txt ofstream out_stream5;// write display.txt float price=' ',curr_total=0.0; int itemnum=' ', wrong=0; char next; in_stream.open("ITEMLIST.txt", ios::in); // list of avaliable items out_stream1.open("listWititems.txt", ios::out); // list of avaliable items in_stream2.open("PRICELIST.txt", ios::in); out_stream3.open("listWitdollars.txt", ios::out); in_stream4.open("display.txt", ios::in); out_stream5.open("showitems.txt", ios::out); in_stream.close(); // closing files. out_stream1.close(); in_stream2.close(); out_stream3.close(); in_stream4.close(); out_stream5.close(); system("pause"); in_stream.setf(ios::fixed); while(in_stream.eof()) { in_stream >> itemnum; cin.clear(); cin >> next; } out_stream1.setf(ios::fixed); while (out_stream1.eof()) { out_stream1 << itemnum; cin.clear(); cin >> next; } in_stream2.setf(ios::fixed); in_stream2.setf(ios::showpoint); in_stream2.precision(2); while((price== (price*1.00)) && (itemnum == (itemnum*1))) { while (in_stream2 >> itemnum >> price) // gets itemnum and price { while (in_stream2.eof()) // reads file to end of file { in_stream2 >> itemnum; in_stream2 >> price; price++; curr_total= price++; in_stream2 >> curr_total; cin.clear(); // allows more reading cin >> next; } } } out_stream3.setf(ios::fixed); out_stream3.setf(ios::showpoint); out_stream3.precision(2); while((price== (price*1.00)) && (itemnum == (itemnum*1))) { while (out_stream3 << itemnum << price) { while (out_stream3.eof()) // reads file to end of file { out_stream3 << itemnum; out_stream3 << price; price++; curr_total= price++; out_stream3 << curr_total; cin.clear(); // allows more reading cin >> next; } return itemnum, price; } } in_stream4.setf(ios::fixed); in_stream4.setf(ios::showpoint); in_stream4.precision(2); while ( in_stream4.eof()) { in_stream4 >> itemnum >> price >> curr_total; cin.clear(); cin >> next; } out_stream5.setf(ios::fixed); out_stream5.setf(ios::showpoint); out_stream5.precision(2); out_stream5 <<setw(5)<< " itemnum " <<setw(5)<<" price "<<setw(5)<<" curr_total " <<endl; // sends items and prices to receipt.txt out_stream5 << setw(5) << itemnum << setw(5) <<price << setw(5)<< curr_total; // sends items and prices to receipt.txt out_stream5 << " You have a total of " << wrong++ << " errors " << endl; }

    Read the article

  • how to read mac address with sed vs python

    - by getjoefree
    before, i can read mac with awk tools in windows or winpe, but now it don't support winpe 4.0 64-bit. i want to get this result "set mac=A4BADB9D1E8E" with python 2.6, who could help to me. thanks a lot! as follows: ipconfig -all|sed -nrf getmac.sed | sed -e "s/-//g" D:\LOG\WINMAC.BAT getmac.sed: /Realtek/ { n; s/.*: ([-0-9A-F]+)/set winmac=\1/p; } and "ipconfig -all" command log as bellows: ipconfig -all mac.log Ethernet adapter Ethernet: Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . : WKSCN.WISTRON Description . . . . . . . . . . . : Realtek PCIe FE Family Controller Physical Address. . . . . . . . . : 24-B6-FD-1F-41-E7 DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes

    Read the article

  • Ruby Net::HTTP - Read only x number of bytes of the body

    - by bvanderw
    It seems like the methods of Ruby's Net::HTTP are all or nothing when it comes to reading the body of a web page. How can I read, say, the just the first 100 bytes of the body? I am trying to read from a content server that returns a short error message in the body of the response if the file requested isn't available. I need to read enough of the body to determine whether the file is there. The files are huge, so I don't want to get the whole body just to check if the file is available.

    Read the article

  • How to read public key from PFX file in java

    - by articlestack
    I am able to read private key from PFX file but not public key. I am using following code to read public key. InputStream inStream = new FileInputStream(certFile); CertificateFactory cf = CertificateFactory.getInstance("X.509"); BufferedInputStream bis = new BufferedInputStream(inStream); // if (bis.available() > 0) { java.security.cert.Certificate cert = cf.generateCertificate(bis); System.out.println("This part is not getting printed in case of PFX file"); // } puk = (PublicKey) cert.getPublicKey(); This code is working properly when i read from .cer file. Please help

    Read the article

  • Firefox extension: how to read a cookie name and value on the current page

    - by encryptor
    My extension works on an application, which requires user login. Once the user has logged in, I need to read the cookies and use them in my XMLHttpRequests. So initially I need to check if the cookie is set, if not, I direct the user to the login page. Once logged in, I need to read the cookies and send it as part of my further requests. How do I read cookies from a XMLHttpRequest or otherwise (if we don't even know the name of the cookie) There is to function as getRequestHeader.. but what I need is something like that.

    Read the article

  • How can I read this url in Rebol ?

    - by Rebol Tutorial
    when trying to read this kind of url URL: http://v4.lscache2.c.youtube.com/videoplayback?ip=0.0.0.0&sparams=id,expire,ip,ipbits,itag,algorithm,burst,factor,oc:U0dWSlhTVF9FSkNNNl9QTVhJ&algorithm=throttle-factor&itag=34&ipbits=0&burst=40&sver=3&expire=1275886800&key=yt1&signature=89195E808CB3FBBC7BDE7298A1DC0613D7987F00.D3064112E8F479C523F8DF4FBFDF392CE48167C2&factor=1.25&id=34e01ad39b34b5c9& I get this error read/binary url connecting to: v4.lscache2.c.youtube.com ** User Error: Error. Target url: http://v4.lscache2.c.youtube.com/videoplayback?ip=0.0.0.0&sparams=id,expire,ip,ipbits, itag,algorithm... ** Near: read/binary url

    Read the article

  • using MODI in C# to read image - numbers with a length of 1 is missing

    - by keysersoze
    I am about building an C#-application in which I am trying to read text from an gif-image (OCR) - I am using MODI and the images are a bit like a lotto coupon (random numbers in rows and columns). I now got the following code which read all numbers except single numbers (1, 2, 3...) MODI.Document objModi = new MODI.Document(); objModi.Create("C:\\image.gif"); objModi.OCR(MODI.MiLANGUAGES.miLANG_DANISH, true, true); MODI.Image image = (MODI.Image)objModi.Images[0]; MODI.Layout layout = image.Layout; I cannot change the content of the image but can I do anything with the above code so it can read the single numbers?

    Read the article

  • SharpSSH gets stuck in an infinite stream read in C# SSH app

    - by Ric Coles
    Afternoon all, I'm having a small problem with the SharpSSH library for .Net (see http://www.tamirgal.com/blog/page/SharpSSH.aspx) SshStream ssh = new SshStream("some ip address", "some username", "some password"); ssh.Prompt = "\n"; ssh.RemoveTerminalEmulationCharacters = true; ssh.Write("ssh some ip address"); // Don't care about this response ssh.ReadResponse(); ssh.Write("lss /mnt/sata[1-4]"); // Don't care about this response (for now) ssh.ReadResponse(); // while the stream can be read while (ssh.CanRead) { Console.WriteLine(ssh.ReadResponse()); } ssh.Close(); As you can see, it's fairly straight forward. However, when the while-loop gets stepped into, it won't break out of the loop when everything has been printed to the console and there is nothing else to read. Is there anyway I can manually force it to break when there is nothing else to be read? Cheers, Ric

    Read the article

  • Why Read In UTF-16LE File Won't Convert "\r\n" Into "\n" In Windows

    - by Dbger
    I am using Perl to read UTF-16LE files in Windows 7. If I read in an ascii file with following code: open CUR_FILE, "<", $asciiFile; Then each "\r\n" in file will be converted into a "\n" in memory; if I read in an UTF-16LE(windows 1200) file with following code: open CUR_FILE, "<:encoding(UTF-16LE)", $utf16leFile; Then "\r\n" will keep unchanged. This inconsistency cause problems when I trying to regexp lines with line breaks. My questions is: Is this how unicode works in Perl & Windows? Or Am I using the wrong code? Thanks so much!

    Read the article

  • Avoid read-write access to bad sectors on HDD to continue working on the HDD

    - by goldenmean
    I have a HP Pavilion dv6446 notebook. It had Windows Vista Home premium. After 4.5+ years of usage, just recently it started malfunctioning. While working fine, its screen goes white or sometimes some thin black lines horizontally. Laptop freezes. Hard reboot works. Again it works for some 2 hrs or so, same error. To diagnose I did run the Memory and Hard disk check which is present in the Bios Setup. Memory test passed. Hard disk test returned an error saying something like - "Replace the hard disk". Bad.. Some sectors or platters have gone bad on the disk. (I confirmed this later by further tests mentioned below) Then I tried installing a Ubuntu 11.10. It listed 3 partitions /dev/sda1, sda2, sda2. It again gave error and could not install grub loader on /dev/sda1. Bad sectors. Then redid the Ubuntu installation, this time asked to to install the Ubuntu on /dev/sda3. and kept /dev/sda1 for /home. Installed fine, and works fine as well. Due to unavailability of WiFi/ Ethernet driver for that adapters under Ubuntu( at least I could not configure them and get the networking working at all), I decided to go back to reinstall windows Vista. It did install fine. I did not have to format one data partition which has my data. I just formatted one partition which installed Windows So in effect HDD has not undergone a full format here. Worked ok for 1 day. But same white screen and freeze happened. Looks like while it is in use, it accesses the bad sectors for storing some data and that's when it bombs. I am inclined to think HDD has not failed fully or crashed but has developed bad sectors. Else if it was a HDD crash, it would have refused to boot at all let alone install on it. Questions: Is there any HDD test check under windows or any such tools windows/linux based ewhere which can identify the bad sectors of the HDD and 'lock/isolate' them from further read-write access of any kind. If not what are my options, if any to salvage this laptop HDD without replacing it. EDIT: Would the Disk Error checking tool under windows help in any way?

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >