Quantcast
Channel: Mentor Graphics Communities : Blog List - All Communities
Viewing all 71 articles
Browse latest View live

Tip of the Week: How to find the command line of a child process

$
0
0

If you ever need to figure out what the command line is for a sub-invoked or child process, here are some tips:

 

1). Enable the "Command Line" column in Task Manager

 

This is a simple and effective way to grab the command line if, A) you know the process name you're looking for, and B) the process sticks around long enough for you to capture the command line info. Unfortunately, no Copy and Paste is available, and the parent->child hierarchy is not shown.

TOTW_TaskManager.jpg

 

2). Process Explorer - A great freeware tool from Microsoft. It's Task Manager on steroids!

 

Process Explorer includes a command line field similar to Task Manager, but adds the process hierarchy so you can quickly identify a parent process and one or more of its children. Right-click (or double-click) on the desired process and select "Properties", and the command line information (can be copied!) is available from the "Image" tab.

 

One drawback with Process Explorer, is when a sub-invoked (child) process only runs for a short while. If you're not quick enough you won't be able to grab the process info! For these cases consider Process Monitor (#3 below).

TOTW_ProcessExplorer.jpg

 

3). Process Monitor - Another great freeware tool from Microsoft. It's Process Explorer plus a whole lot more!

 

Process Monitor is a utility that logs process, file system, registry, and network activity. It's not for the faint of heart, but can be extremely useful in troubleshooting very difficult application problems or crashes. When it comes to capturing the command line of a sub-invoked process, it's a champ! Not only can you capture the process hierarchy, but since it's a logging tool you can grab (and copy) the command line info even if the process runs for only a split-second.

 

Follow the screen-shots with directions below:

TOTW_ProcessMonitor.jpg

 

After clicking the "Show Process Tree" icon:

TOTW_ProcessMonitor2.jpg


Tip of the Week: Microsoft will end support for Windows Server 2003/R2 next year

$
0
0

Microsoft will end support for Windows Server
2003/R2 next summer on July 14, 2015.
End of support for Windows Server 2003/R2 means
that no more updates or patches will ship from Microsoft.

 

Microsoft
will no longer develop or release any updates after ending support. If you are
staying the Server OS, upgrade to either Windows Server 2008 or 2012.

Be sure to
check the approved platforms for your Mentor application before making any
platform changes.

How to Configure USB CDC Function to work as Virtual Com Port using Nucleus RTOS?

$
0
0

hi!!!!

I am using Nucleus RTOS, on K70120M target board.I tried to configure USB as CDC function device to make use of it as virtual com port.I am unable to send or receive data.Can anyone help me how to do this.If u share some example code ,it will be helpful for me. I need information on Device register,Call back functions register & Tranfer,receiver functions

 

Thanks

Aravind

Tip of the Week: Getting the MAC address on Windows

$
0
0

Most of you reading this already know that opening a DOS command shell and entering the command 'ipconfig /all' will return a lot of useful information, including the MAC address. If you use the MAC address as the hostid for mobile compute licenses you have done this many times I suspect. Nothing wrong with doing that, it works. But if you'd like a way of doing it that returns a lot less data you don't need, can be executed remotely, and could be used to obtain this information programmatically for your entire user base- read on.

 

Such a command exists, and it's been there the whole time: getmac

 

getmac has some useful options which you can read about by running the command 'getmac /?'. Here are the ones I find most useful:

 

This one returns the MAC address for each network device without any header information.

C:\> getmac /nh

00-26-B9-xx-xx-xx   \Device\Tcpip_{66A49F71-AB71-42BE-99D0-71027A377490}

00-50-56-C0-00-01   \Device\Tcpip_{9A9C7A14-6867-4877-8DFD-E1DA5378ADDF}

00-50-56-C0-00-08   \Device\Tcpip_{7CABA731-102F-4BB1-A4DA-D054804F6E31}

 

It is easy to identify my wired device in this case, because I know anything that has 00-50-56-C0 at the beginning is a VMware virtual adapter. But let's pretend I had a wireless adapter in my machine also, and I got 2 addresses that were not virtual adapters. How would I know which of them was the one I wanted?

 

I'd use the /v (verbose) option:

 

C:\> getmac /nh /v

Local Area Conn Broadcom NetXtr 00-26-B9-xx-xx-xx   \Device\Tcpip_{66A49F71-AB71-42BE-99D0-71027A377490}

VMware Network  VMware Virtual  00-50-56-C0-00-01   \Device\Tcpip_{9A9C7A14-6867-4877-8DFD-E1DA5378ADDF}

VMware Network  VMware Virtual  00-50-56-C0-00-08   \Device\Tcpip_{7CABA731-102F-4BB1-A4DA-D054804F6E31}

 

If I'd had another hardware NIC, I could tell by the description which was which.

 

So far, all the information has come from my local machine. If I want to know the MAC addresses on a different machine, I'll use the /s option:

 

C:\>getmac /s orw-kfost-t5610

 

Physical Address    Transport Name

=================== ==========================================================

34-17-EB-xx-xx-xx   \Device\Tcpip_{EC36C646-EB29-4E80-92AC-3D3F91293B22}

00-50-56-C0-00-01   \Device\Tcpip_{9D1AE766-04FB-4E67-BE2E-FD6A64BDF54A}

00-50-56-C0-00-08   \Device\Tcpip_{E3C15C4F-DE49-4E01-8EA1-928704365A9A}

 

Note that this time I omitted the /nh option so I could see the header.

 

With a little elbow grease, you could wrap a script around getmac to gather the MAC addresses for your entire site in one go, and then parse that data into a useful report you can use for license ordering or renewal.

 

Thanks for reading!

 

-K

 

Tip of the Week: Important X-ENTP VX.1 Media Installation Information

$
0
0

There are significant changes in the X-ENTP VX.1 release media and some new options that affect which downloads you should get and how you should install them. We strongly encourage you to carefully read the release documentation available on the download page before you make any selections or begin installing the software. This is especially important if you are considering one of the 64-bit native media sets. The information provided in the release documentation can help you make an informed decision about whether the 32-bit or 64-bit media set is the right one for you.

 

We also have a TechNote that augments some of the information in the release documentation.

Tip of The Week: The Do’s and Don’ts of Switching PCB Releases

$
0
0

The Configurator has been discontinued in all VX releases, replaced by the 'Registrator' and 'Release Switcher' programs. Here are the main points to know about on the topic of switching between PCB VX releases (for example: EE VX.1 and PADS VX.0):

  • The 'Release Switcher' is available in the Start Menu at
    • Mentor Graphics PCB > The MGC PCB Release Switcher
  • VX releases support "side-by-side" registration, which means you no longer need to switch between releases like you did with the Configurator, for pre-VX versions.
    • There are a couple of exceptions when running the 'Release Switcher' is required, in order to define which VX release is the "active" release:
      • Automation
      • File Associations (for ex: double-clicking a .pcb to open Xpedition and the design in one action)
  • When you first run the 'Release Switcher', it may not know about all of the releases on your system, especially if they are in different install targets. The 'Release Switcher' learns, and in turn populates the list, as you 'Browse' to different releases.
  • In the 'Release Switcher, when browsing for the 'Release', navigate to the product root folder that is under the installation target.
    • Example target locations for releases installed to the default and recommended 'C:\MentorGraphics' target:
      • C:\MentorGraphics\7.9.5EE
      • C:\MentorGraphics\EEVX.1
      • C:\MentorGraphics\PADSVX.0
  • Do not attempt to use the 'Configurator' to configure a VX release, or to switch releases.
  • Use the 'Release Switcher' to switch releases, even pre-VX releases (for example, EE 7.9.5 or PADS 9.5).
    • Also works for releases in completely different root target locations (with the Configurator you had to run "Configurator -clean" every time you switched).
  • The Release Switcher is essentially a 'wrapper' program. It sub-invokes the 'Registrator' for any VX releases, and the 'Configurator' for pre-VX releases.

Tip of the Week: DOS Command Line Productivity Tricks

$
0
0

Hello Community! Welcome to the first Tip of the Week for 2015.

 

I've been doing a lot of work in a DOS command window lately and I've learned a few things that have helped me be more productive. I thought I'd share some of them you. I hope you find them useful.

 

To reduce the amount of typing you have to do, there are a couple of useful function keys that are pre-defined on your DOS command shell:

 

  1. F3 -  Paste the last command you executed on the command line. Same as the up arrow, but easier to find on a laptop keyboard.
  2. F7 -  Pops a window up that has a numbered list of recently executed commands. Scroll to find what you want then press enter to execute it.
  3. F9 -  If you remember the number for the command you want (from the list when you pressed F7), you can execute it by pressing F9 and then enter the number.

 

There are other function keys defined, but these are the ones I use the most.

 

I find it easy to forget sometimes exactly what file system I'm in when I'm on a mapped drive. One trick I like to use is to modify the prompt so that when I'm on a remote file system I see the UNC path name instead of the drive letter. For example, the Z:\projects\> prompt becomes \\filesvr\mgc\projects Z:\>. Note that when I'm on a local drive, the prompt appears as simply driveletter:\path.

 

One of the best features in Windows is the Windows Explorer because it lets you see files and directories in a context of what's above them, beside them, and beneath them. In a DOS command shell, the tree command gives you that functionality. It's great for smaller directory structures as-is, but for larger ones you'll want to use it with a pipe  ( | more) or redirect the output to a file ( > filename.txt) as the scrolling capability is limited.

 

Give those a try! If you have any DOS commands you find useful, reply to this post and share them. I'm always looking for more.

 

-K

Tip of the Week: Never Select "Run as administrator" Again

$
0
0

When you need to run shell commands on Windows as an Administrator, you typically must right-click the cmd.exe and choose "Run as administrator" in order to elevate the privileges in that shell. Well, it's very easy to create a shortcut for cmd that elevates automatically.

 

1. Create a shortcut to cmd.exe, perhaps on your Desktop. You might want to rename it Admin_cmd or something similar.

2. Right-click the shortcut and select Properties.

3. Select the Shortcut tab and then click Advanced...

4. Check the Run as administrator option and click OK

2015-01-09_152346.png

5. Click OK

 

Now you can simply double-click this shortcut whenever you need elevated privileges.


Tip of the Week: Create Alias Names for License HostIDs

$
0
0

If you are tracking and maintaining licenses for multiple license servers and/or users, remembering which server or user has which HostID can be a challenge. The Mentor License Utility (MLU) provides a facility to create an ‘Alias’ for any given HostID.

 

Once the HostID alias has been created, any licenses that are downloaded or separated for the HostID using MLU, will be copied into a separate “By_Alias” folder, and the name of the license file will be the alias name. In addition, any time the HostID is referenced in the license file, or in any ‘install license’ dialogs, the alias name will appear in parenthesis next to the HostID.

 

For some examples of where you will see the alias name for a HostID, and to learn how to create a HostID Alias, refer to pages 69-75 in the MLU Users Manual (attached).

 

To download a copy of the Mentor License Utility v3.0 from SupportNet, click here.

Tip of the Week: Restarting Windows Without Restarting Your PC

$
0
0

What do you do when Explorer crashes?  No matter what you do, it won't respond to mouse clicks, the windows white out and all you get is the spinning circle.  Other applications are still working, it is only Windows itself that has failed.  Restarting your computer is the simple answer, but what if you've got something critical running?  The answer is to restart Windows without restarting your PC.

 

1) Save what work you can and quit what you don't need in case this trick doesn't work.

2) Invoke Task Manager by either using CTRL-ALT-DEL or right-clicking on the task bar and choosing Task Manager from the menu.

3) From the Task Manager window, click on the Processes tab and find explorer.exe (NOT iexplore.exe) in the list of processes. Highlight it and click End Process.

4) After killing the explorer.exe process, click on the Applications tab and then click on the New Task... button.

5) In the Create New Task button, type in C:\Windows\explorer.exe. Click on the browse button to make sure you're pointing to the right file. Then click Open and then OK.

 

Windows Explorer should now reload and give you control of your computer back. If it doesn't work, that means you probably cannot get around restarting your computer.

 

Even if this does regain control of your PC, reboot as soon as it is convenient as there could be underlying problems.

Tip Of The Week: Configuring license timeout in vNPI 9.5

$
0
0

vNPI 9.5 can be configured to automatically check the licenses back in when a certain idle period has elapsed. This is done in the Engineering Toolkit window configuration settings.


Open vNPI 9.5 Engineering Toolkit window.
Go to the Options dropdown and select Configuration.
In the Configuration Parameters window select the line beginning with 'auto_logout_timeout' and click Modify under the Edit dropdown.
Enter the desired number of minutes (minimum of 20) in the Value field in the Edit Configuration Parameter window.
Click Apply and OK and exit the Configuration setup.
The vNPI licenses will automatically check back in if 20 minutes (for example) have passed and the tool has been idle.

The default time value is 0. If the automatic timeout is no longer desired, change the value to 0 following the setup steps above.

Tip of the Week: The Power of WMIC

$
0
0

I'm a huge fan of command line utilities that provide fast, no-nonsense access to information and allow me to perform some basic configuration tasks. Evidently there are some people at Microsoft who are as well, because they created the Windows Management Instrumentation Command-line utility, or WMIC.

 

I could not begin to describe everything you can do with it, but allow me to throw out a few commands to give you some ideas.

 

This command gets you the status of all the printers on the machine:

 

     C:> wmic printer list status

 

If I want to know the status of the printers on a remote machine, I can provide a node name:

 

     C:> wmic /node:"some-other-machine" printer list status

 

This command collects the environment variables from several machines and display it in list format:

 

     C:> wmic /node:"machine1", "machine2" environment get /format:list

 

This command gets information about the monitors that are attached to these computers (I can add as many as I want in a comma separated list). It provides some useful data like manufacturer, HxW, resolution, etc. By using the format type htable, I can create a web page that contains this information. It's a pretty cool way of gathering information if, lets say, you were trying to find out who the candidates are for a monitor replacement. BTW, wmic can get information about any hardware components in the system and also can report on installed software, the BIOS, etc.

 

     C:> wmic /node:"machine1", "machine2", "machine3"  desktopmonitor get /format:htable > monitors.htm

 

And now, two of my personal favorites!

 

This one shows me if a certain executable is running on any of the computers in my list. The 'where name=' stuff filters out information about all the other processes. Without that option, it would show me all processes running on the system(s). In this example, I used it to find out if any of these machines were running iCDB Server Monitor. Those that were displayed their hostname (csname) and the executable path. Without those two parameters, it would show me much, much more information about the process (way more than needed).

 

C:>wmic /node:"orw-foster-w7", "orw-kfost-t5610", "kvmw7x64" process where name="iCDBServerMonitor.exe" get csname, executablepath

CSName         ExecutablePath

ORW-FOSTER-W7  C:\MentorGraphics\7.9.5EE\SDD_HOME\iCDB\win32\bin\iCDBServerMonitor.exe

KVMW7X64       C:\MGC\RSCM\EEVX.1\SDD_HOME\common\win32\bin\iCDBServerMonitor.exe

 

Here's an idea: Run a scheduled task that uses wmic to look for a particular process, dump that information in htable format, and copy that .htm to a web page. Now you can see who is running what at a glance.

 

I mentioned that you could also use it to perform some configuration tasks. In this example, I'm using it to change the value of the existing MGLS_LICENSE_FILE environment variable on a remote machine. As before, I could have a number of machines in my list separated by commas. Note that the output below the command line confirms that the operation was successful. I could easily create variables with wmic as well.

 

C:>wmic /node:kvmw7x64 environment where name="MGLS_LICENSE_FILE" set variablevalue="1717@wv-lic-01"

Updating property(s) of '\\KVMW7X64\ROOT\CIMV2:Win32_Environment.Name="MGLS_LICENSE_FILE",UserName="<SYSTEM>"'

Property(s) update successful.

 

Give wmic a try! It may take a while to get the hang of the syntax, but it's worth it if you need to do a lot of remote administration.

 

If you come up with some good ones, please share!

 

-K

Tip of the Week: Drag a path to your Windows command line

$
0
0

Did you know you can drag a path from Windows Explorer to the Windows command line? It's true! Watch:

 

Tip of the Week: Mentor License Utility v3.0 - 'Server Services' Tab

$
0
0

The Server Services tab in Mentor License Utility v3.0, provides quick access to almost every corner of your Mentor Graphics (mgcld daemon) license manager service.

 

  • Lmgrd.exe/Mgcld.exe version, TCP port and process ID info.
  • Open license, log and Options files
  • Restart service, reread, lmstat, lmdiag and other functions.

 

For more details, refer to page 35 in the MLU Users Manual (attached).

 

To download a copy of the Mentor License Utility v3.0 from SupportNet, click here.

 

MLU_serverServices.jpg

Tip of the Week: Use System Restore

$
0
0

System Restore's job is to keep notes of everything you change on your computer, enabling you to reverse them with a couple of clicks.

On Windows 7, right-click Computer, select Properties > System Protection > System Restore > Next, and choose the restore point you'd like to use. Click the new button to 'Scan for affected programs' and Windows will tell you which (if any) programs and drivers will be deleted or recovered by selecting this restore point.

Mentor Graphics applications can sometimes be adversely affected by other programs that are installed and registry settings that get changed. Reversing those changes by returning to a restore point can get Mentor software back up and running.


Tip of the Week - Skipping MSVC++ Redistributable Installation

$
0
0

In most Mentor Graphics PCB releases, the MSVC++ Redistributable software is installed every time you install software. It's useful in the cases where you install new releases, but its not always necessary when re-installing the same release or applying updates.

 

Setting the environment variable SDD_SKIPCORECOMP=1 before installation prevents the installation of these packages, and can save you a bit of time during installation. It's especially useful when you are installing a source tree for client/server installation on Windows. If the server is not used to run the applications, there is no need for the SDD core components.

 

Use this with caution! It will prevent the packages from being installed in if set, and you do need those packages to run the applications or if you are re-installing to repair a corrupted software installation.

 

-K

Tip of the Week: Reread or restart?

$
0
0

A common question arises when managing a license server. Should I use lmreread to pick up changes in the license file or options file or should use lmdown and then restart the license server?

 

Over the years, I've found that lmreread generally works well for adding new licenses or for picking up simple changes to the options file such as defining a new LM_PROJECT.

 

However, for swapping complete license files or for changes to the options file that involve restricting access to licenses (e.g.: RESERVE), you must be careful with lmreread and should probably opt for a restart. In the case of controlling access with keywords, it's one thing to add a new license and define who can check it out with INCLUDE. It's another thing to remove access for a user or host that already has that license checked out. Scheduling a restart can help mitigate problems.

 

What are your experiences? Please feel free to share your best practices.

Tip of the Week: PADS VX.1 Key Licensing and Infrastructure Information

Tip of the Week: Batch Script Commands to Terminate Programs

$
0
0

If you write batch scripts to install, update or remove Mentor Graphics software, then you might find this Tip of the Week useful.

 

It’s very important, particularly for our PCB flow software that has iCDB architecture, to make sure that programs are not running before you make any change to the system that affects them. Here are a few simple commands you could use in your batch scripts to avoid problems while installing, updating, or removing.

 

Many programs will gracefully close down a running instance if you run it again with a –close argument. This one will exit iCDB Server Manager. This is nice because you won’t get an error if the program is not currently running.

 

%SDD_HOME%\iCDB\win32\bin\iCDBServerManager.exe -close

 

 

Another way of doing it is to use the taskkill command. Unlike the command above, this will complain if the program isn’t running, and if it is running you’ll get confirmation that the process has been terminated. That’s useful if you really want to be sure one way or the other about the programs current status.

 

          start "Window name" /w /min cmd /c taskkill /f /im "iCDBServerMonitor.exe"

 

If the program is a service, then it supports the start, stop, and remove arguments in all likelihood. In this example, I’m stopping the RSCM service and then removing it. The call statements are there to ensure that the operation completes before the next command executes.

 

           echo Stopping and removing the RSCM service, if it is running...
           call "%SDD_HOME%\iCDB\win32\bin\iCDBNetLauncher.exe" –stop
           call "%SDD_HOME%\iCDB\win32\bin\iCDBNetLauncher.exe" –remove

 

I hope you find these commands useful!

 

Ken Foster

Mentor  Graphics Global Support and Services

 

Tip of the Week: PADS VX.0 and VX.1 can run side-by-side

$
0
0

One of the benefits of "VX" releases is they can run side-by-side. This means there is no longer a requirement to "switch" releases like there was with PADS 9.5 and earlier. Both PADS VX.0 and PADS VX.1 releases can co-exist in the Start Menu*, and you can even run programs from both versions at the same time!

 

The only time you might want to run the Release Switcher is to:

  • Set the "active" release for the purpose of file associations (for Ex: when you double-click a .pcb which release of PADS Layout does it open), and
  • Do what the Configurator used to do at pre-VX releases - reregister DLLs, define WDIR, recreate Start Menu shortcuts, and run other similar tasks in the event of an application crash or other unexpected behavior.

For more details on the 'Release Switcher' refer to TechNote MG586150 on SupportNet.

 

* Start Menu locations for PADS VX.0 and PADS VX.1:

 

PADS VX.0:

     Start Menu > Mentor Graphics PCB > PADS VX.0 (32-bit)

 

PADS VX.1:

     Start Menu > PADS VX.1 (32-bit)

Viewing all 71 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>