2012-04-09 47 views
0

我正在嘗試使用gpg.exe --gen-key命令生成GPG密鑰。輸入包括密碼在內的所有詳細信息後,進程將陷入循環,並不斷重複以下消息。生成密鑰時GnuPG卡住

gpg: NOTE: you should run 'diskperf -y' to enable the disk statistics 
gpg: DBG: rndw32: get performance data problem 
gpg: NOTE: you should run 'diskperf -y' to enable the disk statistics 
gpg: DBG: rndw32: get performance data problem 
gpg: NOTE: you should run 'diskperf -y' to enable the disk statistics 
gpg: DBG: rndw32: get performance data problem 

我在Windows 7上使用gnupg-w32-1.0.6任何人都可以幫忙嗎?

+0

什麼是rndw32?我相信這是有人需要看的地方。 – 2012-04-10 05:12:40

回答

0

我仍然不知道原因並解決了上述問題。我在另一臺機器上嘗試過,它工作。所以我只是將文件夾C:\gnupg複製到我的機器上,並且事情從此開始正常工作。看起來gpg不能在這臺機器上生成密鑰。

0

從rndw32.c:

/* Get disk I/O statistics for all the hard drives */ 
     for (nDrive = 0;; nDrive++) { 
      char diskPerformance[SIZEOF_DISK_PERFORMANCE_STRUCT]; 
     char szDevice[50]; 

     /* Check whether we can access this device */ 
     sprintf (szDevice, "\\\\.\\PhysicalDrive%d", nDrive); 
     hDevice = CreateFile (szDevice, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, 
         NULL, OPEN_EXISTING, 0, NULL); 
     if (hDevice == INVALID_HANDLE_VALUE) 
      break; 

     /* Note: This only works if you have turned on the disk performance 
     * counters with 'diskperf -y'. These counters are off by default */ 
     if (DeviceIoControl (hDevice, IOCTL_DISK_PERFORMANCE, NULL, 0, 
        diskPerformance, SIZEOF_DISK_PERFORMANCE_STRUCT, 
        &dwSize, NULL)) 
     { 
      if (debug_me) 
      log_debug ("rndw32#slow_gatherer_nt: iostats drive %d\n", 
             nDrive); 
      (*add) (diskPerformance, dwSize, requester); 
     } 
     else { 
      log_info ("NOTE: you should run 'diskperf -y' " 
        "to enable the disk statistics\n"); 
     } 
     CloseHandle (hDevice); 
     } 

看來,這個解決方案,如果您使用遠程連接,可能是這一個: (從microfocus.com提取)

Enabling Remote Monitoring for Windows XP 

    An error message might occur when trying to monitor a computer that is running the Windows XP operating system. If so, enable monitoring remotely. 

     Open Windows Explorer on the target Windows XP computer. 
     Choose Tools > Folder Options . 
     Click the View tab. 
     Uncheck the Use Simple File Sharing check box. 
     Click OK. 
     Verify privileges on the target Windows XP computer as follows: 
      If the system root is on an NTFS partition, you must possess at least READ access to the following files: 
       %SystemRoot%\System32\Perfc009.dat 
       %SystemRoot%\System32\Perfh009.dat 
      You must possess at least READ access to the following registry keys on the remote computer: 
       HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurePipeServers\winreg 
       HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib 
     Reboot the Windows XP computer. 

    A user who possesses administrator rights to the remote computer can now view the remote counters. 

如果有人在本地機器上有這個問題,也許答案可能是這種啓用它的其他方式:

檢查是否啓用了此命令:

DISKPERF 

如果不是的話,嘗試使它:

DISKPERF - Y 

我知道這個帖子是一對年之久,但因爲我有一個Debian的操作系統,我用GPG類似的問題在其他網站上找到了很少的完整答案,我想這可以爲其他網站節省一些時間。

順便說一句,在我的情況下,我沒有被卡住。也許你提到的循環是因爲它試圖從安裝在系統上的多個磁盤獲得靜態或報告?