Skip navigation
All Places > Licensing and Installation > Blog

Network latency is of great concern when using Mentor Graphics software, particularly the releases that have an underlying iCDB architecture. The ping utility is often used to get an idea of how the network is performing. However, the ping results are sometimes not granular enough, and the data can be difficult to analyze if you run ping for long periods of time.

 

In this tip of the week, I'll tell you about one of my favorite tools for getting good network latency data: psping.

 

To get useful network latency measurements you should use a larger packet size that closely represents the packets created by the application you are verifying, and you need to do it over time. You can do that with the standard ping command, but then you'd have to post process the data to get the information you want. Doable, but not desirable. One thing that you can't do with the standard ping that is sometimes useful is ask it to use a specific port number so you can verify that the port you want to communicate with is open. Psping does all that, and provides a tidy summary report.

 

Psping works in client/server mode for the network latency test. In this example, I'll start a psping server on a machine called 'kvmw7x64', and ask it to listen for pings on port 9001 using TCP protocol. I've also specifed IPv4:

 

pspserver.png

 

Now on a client machine, I'll start psping and ask it to transmit 1200 byte packets to kvmw7x64 on port 9001 for 3600 seconds (1 hour):

 

pspclient.png

 

When the hour is up, I can view the results as a summary. This provides a pretty good indicator of what my actual network latency is over time.

 

pspresults.png

I'd suggest you fire this up during the time of the day when your network is the most heavily utilized and again when it's the least heavily utilized. Save these numbers as a baseline. It might not hurt to run it every so often to see if things are changing. Then, any time you suspect problems you are having are related to a slow network, run it and compare the results to your baseline. That should either incriminate your network exonerate it.

 

-K

It is sometimes helpful to do a status of the license server by feature name. This is done by using the lmstat command with the '-f' option. Here's the syntax:

lmutil lmstat -f [feature] -c [path to license file]

 

*Specifying the path to license file is not necessary if the path is set in LM_LICENSE_FILE

 

For example, this command will show if the feature 'pwrshell' is in use, and by whom:

C:\MentorGraphics\Licensing>lmutil lmstat -f pwrshell -c c:\flexlm\test.txt

lmutil - Copyright (c) 1989-2013 Flexera Software LLC. All Rights Reserved.

Flexible License Manager status on Fri 2/14/2014 12:24

 

[Detecting lmgrd processes...]

License server status: 1717@ORW-6YNPBZ2

License file(s) on ORW-6YNPBZ2: C:\flexlm\test.txt:

 

ORW-6YNPBZ2: license server UP (MASTER) v11.11

 

Vendor daemon status (on ORW-6YNPBZ2):

 

mgcld: UP v11.11

Feature usage info:

 

Users of pwrshell: (Total of 1 license issued; Total of 1 license in use)

"pwrshell" v2014.020, vendor: mgcld

floating license

 

jasper ORW-6YNPBZ2 147.34.58.29:0.0 (v2012.06) (ORW-6YNPBZ2/1717 101), start

Fri 2/14 12:23

Describing a problem (or a solution) is often much easier using a picture.

 

Windows 7 contains a screenshot tool I use almost every day.  "Snipping Tool" is now available in the Accessories program group:

 

Feb7_im1.jpg

 

In the picture above, I have highlighted what I want the reader to look at using a "red pen" before copying and pasting the picture into my document or e-mail.

 

How to capture a screenshot of a menu

 

If you want a picture of a menu (like the one above), select "New":

Feb7_im2.jpg

Then press ESC, open the menu and then press CTRL+PrtSc (Ctrl, then Print Screen).  Then drag around the area you want to capture.

 

 

Finally, if you like a challenge, how did I generate a screenshot of the Snipping Tool menu?

For those of you who are new to Linux, or maybe looking to add some new commands to your system admin toolbox, check out the following article from our friends at thegeekstuff.com, filled with examples and more!

 

50 Most Frequently Used UNIX/Linux Commands (With Examples)

 


Whether it's defining a path in an environment variable, a .ini file or in an application, typing a long path can be frustrating and is prone to typos that can cause problems for you to troubleshoot. Here is an easy of getting an accurate path to a folder into your paste buffer.

 

When you navigate with Windows Explorer to the folder for which you need the path, click in the field that shows the hierachy of folder names and it will become a path to that folder that you can copy and paste.

 

2014-01-25_200057.png

Everyone is probably familiar with using a wild card with the rm command to delete a large number of files in one go. For example, this command would remove all files that start with 'test' or end with '.c':

 

rm test.* *.c

 

It's very useful, but if you have a lot of files with dissimilar names, it can still be a bit tedious. In this Tip of the Week, I'll show you how to use an operator to specify which files not to remove.

 

Using the ! operator, I can make rm remove everything except what matches my command line arguments. The following command removes all files except those that start with 'test' or end with '.c':

 

rm !(test.*|*.c)

 

Give it a try!

What is the mgc.pkginfo file?

 

The mgc.pkginfo file contains the cross-reference information which describes what "atomic" licenses are included in "composite" features.

 

When does it need to be updated?

 

The mgc.pkginfo file needs to be updated when product bundling changes in a new release, and you want to use the new license in an older version of software.

 

Example:

 

Let me look at a example as a way to describe this in more detail:

 

Last year, Expedition introduced a "dual" license which enables either Design Capture or DxDesigner to be run.  The new license is called "wgdxd_c".

 

This "wgdxd_c" composite contains both "wgdsncap" (for Design Capture) and "viewdraw" (for DxDesigner).  The composite license "wgdxd_c" is then checked out when either tool requests a license.

 

The latest release of software already knows about this new license (because the mgc.pkginfo file supplied with that release contains the information) but what about older software releases?

 

If you want to use the new "wgdxd_c" license with older releases of software, you will need to update your old software tree with a new version of mgc.pkginfo.

 

How do I update mgc.pkginfo?

 

Technote MG504224 contains an automated method of updating the file, and a link to the latest file along with a manual method (if you prefer that method).

In the event that you run into a fatal application error (not licensing) with your SDD application on Windows, here are some tips and tricks on how to try and fix it:

 


First run the Configurator:

 

Run the following command (adjust the 'C:\MentorGraphics' path if you installed to a non-default location):

 

C:\MentorGraphics\win32\configurator.exe

 

 

If that doesn't resolve the problem, add a '-clean' to the procedure:

 

Run commands:

 

C:\MentorGraphics\win32\configurator.exe -clean


C:\MentorGraphics\win32\configurator.exe

 

 

Next stop (if fatal error persists), Configurator '-clean' and reinstall the Microsoft C/C++ VS Redistributable:

 

Run commands:

 

C:\MentorGraphics\win32\configurator.exe -clean

 

C:\MentorGraphics\win32\vcredist_x86.exe (select the option to 'Uninstall')

 

(Reboot if prompted)

 

C:\MentorGraphics\win32\vcredist_x86.exe (to install)

 

C:\MentorGraphics\win32\configurator.exe

 

 

If the problem persists, other things to try:

 

- Check to make sure there are no old/invalid paths in the user or system-defined PATH environment variable. For example, paths to SDD releases other than the current release.

 

- Create a new WDIR folder, and change the first entry in the WDIR environment variable to the new location.

 

 

I hope that helps. If not, best to open a new Service Request on SupportNet.

 

Have a safe and great New Year everyone!

 

Cheers,

Andrew

We've previously discussed how to get fairly detailed debug information with the MGLS_DEBUG_LOG_DIR variable - Tip of the Week: Check requested license feature with debug. But sometimes a quick confirmation of the license checkout can be nice to see in the transcript. And, if anything fails, an error message will be right there.

 

The FLEXLM_DIAGNOSTICS variable is a simple way to show some debug information. Simply set FLEXLM_DIAGNOSTICS=3 in your environment and you should see something like the following in the shell where you invoked the application:

 

Checkout succeeded: msimhdlsim/9E204CB2CC009FD365DE

        License file: 1717@licserver

        License Server: 1717@licserver

License granted through "msimhdlsim".

 

 

I hope you find this useful. Be sure to share your own tips!

 

Guy

I'll confess that I'm a bit of a novice when it comes to automation in our tools (fortunately Mentor Graphics has experts in this area, I'm just not one of them). Still, I occasionally dabble in the creation of Visual Basic scripts that help me troubleshoot problems or configure an application the way I need it for testing purposes. In this Tip of the Week, I'll show you something I learned that simplified development of my scripts.

 

I was unaware of this feature until one of the aforementioned experts told me that I could use Windows Explorer to drag and drop my .vbs file onto the application window. Doing that will execute the script without the need to put any of the files in a certain location, modify the scripts.ini file, or exit and re-start the application. For example:

 

dragdrop.jpg

The application looks at the type of file you've selected and will put a '+' sign next to your cursor if the file type is compatible with the place you want to drop the file. If it's not compatible, you'll see a circle with a circle with a '/' through it. Using this method allows you to quickly test and debug the script before you put it into your production environment.

 

Something I learned as I was writing this blog is pretty useful as well, so I thought I'd share that as well. It seems the Message Window is compatible with a number of file formats. So far I've used this trick to view .jpg, .png, .txt and .pdf files in the applications message area!

 

Thanks for reading. I hope this tip was useful.

 

Ken Foster

Mentor Graphics Customer Support

Typically, the default port (1700 or 1717) set in your license file will be fine. However, you may find that there is another license manager running on one of those ports. If you select a port that is in use, you will see something like the following in you license server debug log file:

18:23:28 (lmgrd) The TCP port number in the license, 1717, is already in use.

Edit your license file and try another port such as 1700 or 1718.

I have noticed a recent increase in the number of customers asking for their latest authorization codes (licenses) - so this week's "Tip of the Week" is a reminder.

 

Licenses for your site are available from Supportnet via the "My Licenses" link in the left navigation bar:

 

     Nov27_Image1.jpg

 

If you subscribe to the SupportPro Newsletter, they are also available from the "Find It Fast" menu:

 

     Nov27_Image2.jpg

 

Finally, if you prefer video, there is a video on the Community site that shows you how to download your authorization codes:

 

     http://communities.mentor.com/docs/DOC-2812

A few weeks ago we showed you a handy shortcut to quickly access the environment variables on your machine:

 

Tip of the Week: Directly Access Environment Variables With a Shortcut.

 

This week we'll explore a related topic of how to change the environment for a single program session on Windows, via a simple batch script.

 

Two examples of why you might want to tailor the environment for a single session, each followed by a sample two-line script:

 

Example #1:

You want to change the MGLS_LICENSE_FILE to point to a different license server (1717@MyDxDserver) when you launch only DxDesigner, and have all your other Mentor applications use the current value that is stored in the environment variable.


Batch script example (make sure the file ends in ".bat" otherwise it won't execute when you run it):

 

set MGLS_LICENSE_FILE=1717@MyDxDserver
start C:\MentorGraphics\9.5PADS\SDD_HOME\wv\win32\bin\viewdraw.exe

 

When you double-click on the .bat (batch) file the MGLS_LICENSE_FILE environment variable gets changed to 1717@MyDxDserver but ONLY for DxDesigner. No other applications are affected by this change.

 

Notes:

- The "start" keyword means the DOS window goes away as soon as the application appears. You can remove the keyword but then the prompt stays up until you close the application.
- To get the path to "viewdraw.exe" you can right click on the DxDesigner shortcut and copy and paste the "target" field.
- If you want the script to work regardless of which version you are configured for, you can reference the %SDD_HOME% environment variable instead of using an absolute path. In this case you would substitute the second line with "start  %SDD_HOME%\wv\win32\bin\viewdraw.exe". In the 2nd example below we use the %SDD_HOME%.

 

Example #2:

You're running into a DLL conflict between DxDesigner and an application from another software vendor. You want to reduce the PATH variable used by DxDesigner to only the system values plus the required Mentor Graphics folders, while keeping the PATH value the same for all other applications.

 

Batch script example (make sure the file ends in ".bat" otherwise it won't execute when you run it):

 

set PATH=%SDD_HOME%\common\win32\bin;%SDD_HOME%\common\win32\lib;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%MGC_HOME%/bin;%MGC_HOME%/lib

start %SDD_HOME%\wv\win32\bin\viewdraw.exe

Whether you want to deifferentiate multiple processes of the same name or simply see which options were used to start a process, the Windows 7 Task Manager will let you view the command line. This may help in finding which process is using a file or differentiating sessions. The possiblitie are many.

 

To enable the Command Line column:

 

  1. Open Task Manager
  2. Pull-down View> Select Columns
  3. Scoll down and check Command Line
  4. Click OK

 

Your Task Manager will now have a column that will show you the command line used to start the process.

 

2013-11-15_160453.png

System requirements are listed on the Systems Requirements page on Supportnet and you can query system requirements by platform or release with the Platform Query Tool.